summaryrefslogtreecommitdiffstats
path: root/lib/libc/hidden/stdlib.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Inroduce malloc_conceal() and calloc_conceal(). Similar to theirotto2019-05-101-1/+3
| | | | | counterparts but return memory in pages marked MAP_CONCEAL and on free() freezero() is actually called.
* Introducing malloc_usable_size() was a mistake. While some otherotto2018-11-211-2/+1
| | | | | | | | | | | libs have it, it is a function that is considered harmful, so: Delete malloc_usable_size(). It is a function that blurs the line between malloc managed memory and application managed memory and exposes some of the internal workings of malloc. If an application relies on that, it is likely to break using another implementation of malloc. If you want usable size x, just allocate x bytes. ok deraadt@ and other devs
* Implement malloc_usable_size(); ok millert@ deraadt@ and jmc@ for the man pageotto2018-11-181-1/+2
|
* Implement C11's aligned_alloc(3). ok guenther@otto2018-11-051-1/+2
|
* New POSIX xlocale implementation written from scratch.schwarze2017-09-051-2/+2
| | | | | | | | | | | | Complete in the sense that all POSIX *locale(3) and *_l(3) functions are included, but in OpenBSD, we of course only really care about LC_CTYPE and we only support ASCII and UTF-8. With important help from kettenis@, guenther@, and jca@. Repeated testing in ports bulk builds by naddy@. Additional testing by jca@, sebastia@, dcoppa@, and others. OK kettenis@ dcoppa@, and guenther@ on an earlier version. Riding guenther@'s libc/librthread major bump.
* Use David Musser's introsort algorithm to fall back to heapsort(3)millert2017-05-201-2/+2
| | | | | | when the recursion depth reaches 2*lg(n + 1). This avoids quicksort's quadratic behavior for pathological input without appreciably changing the average run time.
* Introducing freezero(3) a version of free that guarantees the processotto2017-04-101-1/+2
| | | | | | no longer has access to the content of a memmory object. It does this by either clearing (if the object memory remains cached) or by calling munmap(2). ok millert@, deraadt@, guenther@
* Introducing recallocarray(3), a blend of calloc(3) and reallocarray(3)otto2017-03-061-1/+2
| | | | | with the added feature that released memory is cleared. Much input from various developers. ok deraadt@ tom@
* Reduce qabs() and qdiv() to aliases of llabs() and lldiv().guenther2016-08-141-3/+3
| | | | | | Merge the manual pages and call them deprecated there. ok and manpage tweak jmc@, ok natano@
* environ and __progname are not declared in a public header; declare themguenther2016-03-131-1/+4
| | | | | | in libc's hidden/stdlib.h instead of in each .c file that needs one ok deraadt@ gsoares@ mpi@
* libc.so can't be unloaded, so move the hidden atexit() and pthread_atfork()guenther2015-11-101-2/+2
| | | | | | | | | | | stubs for the executable from crtbegin.o into libc, which lets them be excluded from static links that don't use them. For this, drop the normal crt{begin,end}S.o from libc.so: the .init and .fini sections for libc aren't called at the right times anyway, so it's good that they're unused. libc.so just needs __guard_local and the .note.openbsd.ident section, so add them to stack_protector.c for now (this will be improved) "good time" deraadt@
* Hide __atexit and __atexit_register_cleanup()guenther2015-10-251-1/+2
| | | | | | | | Wrap __cxa_{atexit,finalize}() so the call from exit() goes direct Switch regress/lib/libc/atexit/ to be built with -static so that it can still access __atexit* ok millert@ jca@
* Don't wrap initialized variables: binutils appears to be mishandling themguenther2015-09-191-1/+3
| | | | | | on arm and m88k problems with optind observed by jsg@
* For now, permit overriding of the malloc family, to make emacs happyguenther2015-09-131-6/+6
|
* Overshot w/PROTO_DEPRECATED: seed48_deterministic() is used internallyguenther2015-09-131-2/+2
|
* Wrap <stdlib.h> so that calls go direct and the symbols not in theguenther2015-09-131-0/+158
C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.