wuzhipeng2014 / freenos

Automatically exported from code.google.com/p/freenos
GNU General Public License v3.0
0 stars 0 forks source link

MemoryServer allocates a full page for sizes < PAGESIZE #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
MemoryServer::doGrow() always allocates at least PAGESIZE bytes,
even for sizes much lower than PAGESIZE, for example 1 byte. MemoryServer
should only allocate new pages when the top of the heap rises above
a PAGESIZE boundary.

Another possibility to solve this problem is to always allocate
new heap memory in terms of PAGESIZE, and let applications specify
how many extra pages to allocate instead of bytes.

Original issue reported on code.google.com by coenbijlsma on 7 Aug 2009 at 10:49

GoogleCodeExporter commented 9 years ago

Original comment by coenbijlsma on 7 Aug 2009 at 11:03