Mail Archives: djgpp/1997/09/14/23:17:11
Shawn Hargreaves wrote:
> Sure, fragmentation can occasionally be a problem, but I don't think it
> is something that Allegro should be concerned with. If you need custom
> memory management routines you are very welcome to write some, but the
> standard library routines are perfectly good enough for most situations.
> The only 100% sure way to prevent fragmentation is to use a handle based
> system with movable blocks, which would incur way too much overhead for
> something like Allegro...
On a side note..
I have written memory handlers that clean up and shift around blocks of
free memory to make them contiguous. It's not difficult (except when
virtual memory is involved), it doesn't *need* much overhead, per se,
because you can clean up every n allocations instead of every
allocation. It suffers however from a serious flaw for my code. Tpolygon
framebuffers, like Allegro bitmaps, store offsets to buffer rows in
arrays. The addresses in these arrays ( e.g. line[] ) are invalidated
once the memory manager begins shifting blocks around. Any ideas for
workarounds for this problem?
--
------------ Elliott Oti ---------------
------------- http://www.fys.ruu.nl/~oti ---------
on the Net. See
http://www.lfbs.rwth-aachen.de/~sven/OS-Projects/index.html for links to
them. It is not enough to build the perfect OS (and that isn't easy),
you also need a user base. We might as well work with an alternative OS
that has already built up a sizeable and knowledgeable user base. Linux.
United we stand.
Just 2 cents from a DOS/Win 3.11/sometimes Linux user.
--
------------ Elliott Oti ---------------
------------- http://www.fys.ruu.nl/~oti ---------
- Raw text -