Details
- Reviewers
- None
- Group Reviewers
manpages - Commits
- rGa66d27e22fa0: memory(3): Mention more functions.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 53964 Build 50854: arc lint + arc unit
Event Timeline
lib/libc/stdlib/memory.3 | ||
---|---|---|
41 | we should maybe drop "general" now? |
posix_memalign(3) should be added.
In some sense obsoleted sbrk(2) could be mentioned as well.
Listing mmap as same kind of memory management function as e.g. malloc is strange.
I agree but it's been there for 30 years. I just added munmap(2) because if we're listing free(3) then it's weird to leave out munmap(2).
I missed that some of these are just sorted properly now, not added. I suggested to DES on IRC that we should caution against alloca, based on my mistaken impression that mentioning it here is new.
It is probably mentioning sbrk as well, including a note about both sbrk and alloca that they shouldn't be used.
The alloca(3) man page already warns against using it.
It is probably mentioning sbrk as well, including a note about both sbrk and alloca that they shouldn't be used.
I disagree, sbrk(2) is not really memory management, just a foundation on which you can build your own memory management.
Difference between mmap/munmap and everything else in the list would be that third-party malloc implementations that can be dyn-loaded, interpose all listed functions, but not mmap/munmap.
No, you can use mmap() / munmap() directly to allocate and free blocks of memory. You can't use sbrk(2) in that manner.