This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug malloc/21411] realloc documentation error
- From: "seahen123 at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 25 Apr 2017 01:06:28 +0000
- Subject: [Bug malloc/21411] realloc documentation error
- Auto-submitted: auto-generated
- References: <bug-21411-131@http.sourceware.org/bugzilla/>
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.