[Scummvm-devel] Discworld 2 memory issue

yotam barnoy yotambarnoy at gmail.com
Tue Oct 27 19:25:41 CET 2009


Amazing job Max! DW2 is now working beautifully on the PSP!
Thanks very much -- I saw you put a lot of time into this fix.

Yotam


On Mon, Oct 26, 2009 at 12:04 PM, Max Horn <max at quendi.de> wrote:
>
> Am 26.10.2009 um 10:08 schrieb Paul Gilbert:
> [...]
>> Probably not a good idea to do hacks like this. I concur with the
>> prior emails.. off the top of my head, I think of any major reason
>> why the Tinsel heap manager couldn't be replaced with direct memory
>> allocations/freeings with only minor effort. Some of the existing
>> code, such as the heap compaction routine, couldn't be replicated in
>> a direct allocation scheme, but that might not be needed if we leave
>> everything up the operating system.
>
> I am working on moving the allocation of "FIXED" blocks to be malloc
> based, but will not touch the implementation of "moveable" code
> otherwise. Because I don't think it is that trivial to switch to a
> purely malloc based implementation of the mem manager. For one thing,
> a lot of code never explicitly frees any data, so one still has to
> take care of that. Also, one would still have to watch out to not
> allocate too much memory, i.e. keep a global count of how much memory
> is malloced; if it is too much, some discardable memory blocks need to
> be discarded.
> All of that can of course be done with a malloc based scheme, but IMO
> it requires some care to avoid introducing lots of leaks. So it's
> certainly no magic to make this change, but I'd advise against anybody
> rushing in and making it "blindly".
>
> Bye,
> Max
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>




More information about the Scummvm-devel mailing list