DISCLAMER:
I'm not too common with the way POV-Ray handles its memory.
"Thorsten Froehlich" <tho### [at] trf de> writes:
>
> Whenever I profiled, I found that POV-Ray spends a lot of time doing memory
> allocations...
Couldn't it be useful to have two methods for allocation memory?
1) the POV_MALLOC used so far
2) a new method of memory that can only be freed on exit of the program.
With method 2), POV-Ray can allocate large parts of memory instead of little
chunks. The size of the "little chunks" doesn't matter anymore and therefore
needn't be stored. This decreases memory consumption and its handling
by the OS. The "large parts" could be handled by a linked list. Only for the
last part -- the current one -- a pointer to the last byte (word) that is
used is necessary.
However, I don't know whether:
a) it's really faster
b) the scenario for 2) occurs often enough in POV-Ray to justify the effort
of implementing this.
Thomas
--
http://thomas.willhalm.de/ (includes pgp key)
Post a reply to this message
|