[Scummvm-devel] Discworld 2 memory issue
Bertrand Augereau
bertrand_augereau at yahoo.fr
Sun Oct 25 18:26:57 CET 2009
Alternative hack proposal:
allocate 10Mb+epsilon at main start
do all the launcher stuff and fragmentation
free the block
launch tinsel
--- En date de : Sam 24.10.09, Torbjörn Andersson <eriktorbjorn at telia.com> a écrit :
> De: Torbjörn Andersson <eriktorbjorn at telia.com>
> Objet: Re: [Scummvm-devel] Discworld 2 memory issue
> À: "Max Horn" <max at quendi.de>
> Cc: "ScummVM devel" <scummvm-devel at lists.sourceforge.net>
> Date: Samedi 24 Octobre 2009, 18h52
> Max Horn wrote:
>
> > It would be possible to rewrite the memory manager to
> use multiple
> > chunks, but just using malloc definitely won't work,
> it does extra
> > things like tracking references to memory.
>
> Unless it does something very special, you could probably
> keep the
> memory manager interface more or less unchanged but have it
> use
> malloc/free internally, rather than using a pre-allocated
> memory chunk
> though. It could still go through the list of allocated
> memory blocks
> and discard the oldest, non-locked ones if it reaches some
> threshold value.
>
> The Broken Sword 2 engine used to pre-allocate a large
> chunk of memory
> too, but doesn't any more. It still needs its own memory
> manager because
> the engine has a deeply held belief that data pointers -
> not just the
> pointer to the allocated block, but any pointer to anywhere
> inside it -
> can be stored as 32-bit integers. That was a bit painful,
> but hopefully
> we won't need to jump through those hoops here.
>
> And when I say "we", I of course mean someone else than me.
> ;-)
>
> Torbjörn Andersson
>
> ------------------------------------------------------------------------------
> 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