[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mintlibs memory managing?



W (a primitive mono window system) uses Mxalloc. Author's comments
on the W docs state that MiNTLib free doesn't release the memory
back to MiNT. I'd like some clarification to that. Does it depend
on the order of memory allocation / deallocation ie. when I free B in

AAAABBBBBCCCC		(lib allocation block size eg. one letter)

mintlib would keep the memory block, but release it to MiNT in case of

AAAACCCCBBBBB

?

Should I allocate / deallocate in last-alloc -> first-free order to have
maximum memory available for the OS all the time?


That wouldn't help with W which can't know the size nor lifetime of
a window backup, but for W applications it might matter quite a lot...


What kind of limits MiNT and MiNTLib have for the number of allocated
blocks? Which can handle better numerous very small blocks (like
structures)? MiNTLib I would guess, what's it's overhead?


Btw. Can I set how much free RAM GCC should leave the OS at minimum
by setting GCC's stacksize to a negative value? Eg. would the following
leave at least 256K free RAM for the OS:
	fixstk -256k cc1
?

	- Eero