export netbsd's reallocarr proposal. (#433)

* export netbsd's reallocarr proposal.

acts subtly differently from reallocarray, returns an error code
and first argument as receiver.

* not export by default

* ci tests

* apply suggestions

* doc addition

* Apply suggestions from code review

Co-authored-by: Matthew Parkinson <mjp41@users.noreply.github.com>
This commit is contained in:
David CARLIER
2021-12-02 14:49:32 +00:00
committed by GitHub
parent 7f3642e05c
commit 360efa2123
4 changed files with 164 additions and 1 deletions

View File

@@ -113,3 +113,16 @@ You will also need to compile the relevant parts of snmalloc itself. Create a ne
#include "snmalloc/src/override/malloc.cc"
#include "snmalloc/src/override/new.cc"
```
To enable the `reallocarray` symbol export, this can be added to your cmake command line.
```
-DSNMALLOC_NO_REALLOCARRAY=OFF
```
likewise for `reallocarr`.
```
-DSNMALLOC_NO_REALLOCARR=OFF
```