init_cheap and _csbrk

Conrad Scott Conrad.Scott@dsl.pipex.com
Tue Aug 6 11:05:00 GMT 2002


I stumbled over this last night but I thought it better to wait
until I'd had both sleep and pizza before posting it off :-)

The _csbrk function, from "cygheap.cc", is rounding up the first
allocation to a multiple of a page size, which seems unnecessary
since VirtualAlloc does that anyway (i.e., if you reserve/commit a
single byte on a page, it reserves/commits the whole page).  More
importantly, it can't be right to add the allocation request size
to the return value for the first allocation (except that the
first "allocation" is probably always 0, so actually it's
alright).

And while I was there I moved one initialization about for the
usual "aesthetic" reasons :-)

// Conrad

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog.txt
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020806/5110cf10/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygheap.patch.txt
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020806/5110cf10/attachment-0001.txt>


More information about the Cygwin-patches mailing list