Welcome, Guest. Please login or register.

Author Topic: Amiga Memory Mangement  (Read 3178 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« on: June 20, 2008, 04:34:14 AM »
@trekiej

On the software side, the amiga memory system is simple first fit allocation system. It is a global memory system (that is all tasks/processes share the same global memory pool). Basically this means that many applications are programmed in a way that they access each others memory at will, making it impossible to introduce memory protection (via MMU) without breaking the binary compatibility. The closest you can get is system provided by the mmu.library.

First fit allocators slow down exponentially due to memory fragmentation, the problem made worse by the global memory system. The effects of the fragmentation can be reduced with a better allocator however: for example two level segregate fit. There's a great AmigaOS 3.x implementation by Chris Hodges: TLSFMem.lha. Note that while TLSF does reduce fragmentation it doesn't remove it completely. However the fragmentation still remaining will have no effect on the allocation/deallocation performance.

PS. Fix that keyboard... :-)

@weirdami
Quote
MMU = math thingy?

No. Wikipedia: Memory Management Unit
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #1 on: June 20, 2008, 07:18:18 AM »
The Amiga Hardware Reference Manual should have the Zorro(R) AUTOCONFIG(TM) explained pretty well.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #2 on: June 20, 2008, 08:01:13 AM »
@alexh
Quote
It still has one or two bugs in it which make it a little incompatible with some programs.

What kind of bugs exactly? Would be interesting to do last minute testing of the MOS 2.0 TLSF memsystem I wrote (it's not based on Chris' code but shares much of the ideas, so it might also share bugs).
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #3 on: June 20, 2008, 08:47:36 AM »
I would imagine that's just Degrader doing some rather nasty tricks, it's quite hacky program after all.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #4 on: June 20, 2008, 10:07:27 AM »
@alexh

Ok, no such problem in mine.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #5 on: June 20, 2008, 01:30:41 PM »
@weirdami

Check the thread topic it has a crucial keyword in it :-)
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Amiga Memory Mangement
« Reply #6 on: June 21, 2008, 09:20:43 AM »
Just tried AIBB, and the allocator debug tells me it tries to FreeMem 34 bytes when it allocated much larger chunk. That's bad.