29 December 2007, 15:40
Join Date: Jan 2004
Originally Posted by wepl
It seems that TLSF returns 2,018,011,950 for AvailMem(MEMF_LARGEST).
Which causes that nothing is preloaded because WHDLoad uses this to calculate the puddle size for the memory pools used for the PreLoad memory.
Which version of TLSF did you use? 1.4?
There was a bug in AvailMem(MEMF_LARGEST) according to the changelog.
Originally Posted by planton42
- Fixed enforcer hit (memory write to 8) reported by Bernd Rösch.
- Fixed TLSF memory being counted multiple times, if the original mem
header was present for AvailMem(MEMF_TOTAL).
- Fixed a slight inaccuracy for AvailMem(MEMF_LARGEST) if there were
multiple blocks of the same category or multiple TLSF memory headers.
- When eating a memory header, random MEMF flags were used. Fixed.
- When converting memory headers and the TLSF Mem header is at the end
of the original memory header, it will shrink the original one to
remove the overlap.
- AllocatorBenchmark was broken and would always use MEMF_CLEAR.
- SaferPatches, PatchControl and (probably) SetMan would crash TLSFMem
if started before, because they would try to allocate memory while
TLSFMem calls SetFunction to modify the allocation routine, even before
it could store the old function pointers itself. Hence, SaferPatches
would call the patched TLSF pointer for memory, and TLSF would call
a NULL pointer for legacy memory routines.
To fix this catch22, TLSFMem now also implements the very last legacy
routines Allocate() and Deallocate() itself.
- TLSFMem would crash when run in ROM space, because it tried to save the
old SetFunction() pointers in its code. Now that it doesn't call legacy
routines anymore, this is fixed. However, TLSFMemPool still needs to
store the old function pointers -- When run as resident TLSFMemPool
will not patch memory pool functions.
- Fixed some glitches in CreatePool() when running out of memory.
- MEMF_CLEAR memory clearing now happens outside of Forbid state.
- Fixed some evil glitches in AllocAbs() which could cause aligned memory
allocations operations to fail when memory got fragmented. This could
also explain why PowerUP programs refused to run.
- Enabled minimum sanity check on FreeMem() for correct size parameter.
Will recoverably GURU with $715F0041 when mismatch is detected.
Last edited by alexh; 29 December 2007 at 15:51.