Welcome, Guest. Please login or register.

Author Topic: Memory Pool performance  (Read 2172 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Memory Pool performance
« on: August 10, 2003, 12:43:00 AM »
Well...

Allocating new puddles can be time consuming. Thus if you are doing lot of allocations try minimize need of new puddles.

And for puddle sizes... I think it is better choose something like 4000 than 4200. Puddle sizes are always rounded up (if at all, on OS3 they arent).
My Amigas: A500, Mac Mini and PowerBook
 

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: Memory Pool performance
« Reply #1 on: August 10, 2003, 10:19:09 PM »
In general AllocPooled() is not probably any slower than AllocMem(). But of course if Exec finds out that all puddles are full then Exec must call AllocMem() as well. Thus it is always better oversize puddles bit rather than undersize.

Another thing is FreePooled(). FreeMem() is very simple call but FreePooled() must go through all puddles. In the worst case scenario calling FreePooled() can be very demanding. Piru investigated this issue.. Must ask him :-D

Quote

My understanding of the system is that it just allocates memory rounded to the puddlesize and allows sub allocations for several small objects within a single puddle..


Correct. If memory allocation is larger than treshold value then new puddle is allocated.
My Amigas: A500, Mac Mini and PowerBook