This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug malloc/21411] realloc documentation error


https://sourceware.org/bugzilla/show_bug.cgi?id=21411

--- Comment #2 from Chris Hennick <seahen123 at gmail dot com> ---
(In reply to dj@redhat.com from comment #1)
> I think the intended comment is "*if* remapping is required, *then* a
> map-copy-unmap is used, unless the needed remapping can be done with MREMAP"
> 
> I don't think the intent was to say that a remap is always forced.

Still, because of the case where realloc could free entire pages and doesn't,
there should be an indication in the doc comments that realloc will *never*
free pages when the source region has been mmap'd, the target size is nonzero,
and Linux mremap is not available. (FreeBSD has mremap, but in a different and
incompatible form, and if I understand correctly, using it would mean
implementing glibc *on top of* FreeBSD libc.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]