* Performance of mmap/munmap on linuxppc 2.4
@ 2004-10-01 15:50 Stephen Williams
0 siblings, 0 replies; only message in thread
From: Stephen Williams @ 2004-10-01 15:50 UTC (permalink / raw)
To: linuxppc-embedded
I need to allocate, reallocate(down), and release lage image
buffers, and I've been thinking in terms of using mmap and
anonymous mapping to get the memory:
void*ptr = mmap(0, cur->size_, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
I also munmap the tail of this region when I know how big the
image really is, and munmap the rest when the image is done.
I'm doing this the hard way (instead of using malloc/realloc)
because I want to guarantee that the realoc functionality doesn't
move the data.
So am I shooting myself in the foot performance-wise here?
I'm using a 233MHz 405GPr. I expect to be allocating/freeing
these image buffers 30-50 times a second for 4meg-ish regions,
or somewhat slower for regions 60meg or so. I have no swap.
--
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-01 15:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-01 15:50 Performance of mmap/munmap on linuxppc 2.4 Stephen Williams
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.