mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-08 00:09:31 +03:00
Update readme.md
This commit is contained in:
parent
e33c1521a6
commit
c91bed99e1
1 changed files with 23 additions and 22 deletions
37
readme.md
37
readme.md
|
@ -65,36 +65,37 @@ in the entire program.
|
||||||
|
|
||||||
We use [`cmake`](https://cmake.org)<sup>1</sup> as the build system:
|
We use [`cmake`](https://cmake.org)<sup>1</sup> as the build system:
|
||||||
|
|
||||||
- `mkdir -p out/release`
|
```
|
||||||
- `cd out/release`
|
> mkdir -p out/release
|
||||||
- `cmake ../..` (generate the make file)
|
> cd out/release
|
||||||
- `make` (and build)
|
> cmake ../..
|
||||||
|
> make
|
||||||
|
```
|
||||||
This builds the library as a shared (dynamic)
|
This builds the library as a shared (dynamic)
|
||||||
library (`.so` or `.dylib`), a static library (`.a`), and
|
library (`.so` or `.dylib`), a static library (`.a`), and
|
||||||
as a single object file (`.o`).
|
as a single object file (`.o`).
|
||||||
|
|
||||||
- `sudo make install` (install the library and header files in `/usr/local/lib` and `/usr/local/include`)
|
`> sudo make install` (install the library and header files in `/usr/local/lib` and `/usr/local/include`)
|
||||||
|
|
||||||
|
|
||||||
You can build the debug version which does many internal checks and
|
You can build the debug version which does many internal checks and
|
||||||
maintains detailed statistics as:
|
maintains detailed statistics as:
|
||||||
|
|
||||||
- `mkdir -p out/debug`
|
```
|
||||||
- `cd out/debug`
|
> mkdir -p out/debug
|
||||||
- `cmake -DCMAKE_BUILD_TYPE=Debug ../..`
|
> cd out/debug
|
||||||
- `make`
|
> cmake -DCMAKE_BUILD_TYPE=Debug ../..
|
||||||
|
> make
|
||||||
|
```
|
||||||
This will name the shared library as `libmimalloc-debug.so`.
|
This will name the shared library as `libmimalloc-debug.so`.
|
||||||
|
|
||||||
Finally, you can build a _secure_ version that uses guard pages, encrypted
|
Finally, you can build a _secure_ version that uses guard pages, encrypted
|
||||||
free lists, etc, as:
|
free lists, etc, as:
|
||||||
|
```
|
||||||
- `mkdir -p out/secure`
|
> mkdir -p out/secure
|
||||||
- `cd out/secure`
|
> cd out/secure
|
||||||
- `cmake -DSECURE=ON ../..`
|
> cmake -DSECURE=ON ../..
|
||||||
- `make`
|
> make
|
||||||
|
```
|
||||||
This will name the shared library as `libmimalloc-secure.so`.
|
This will name the shared library as `libmimalloc-secure.so`.
|
||||||
Use `ccmake`<sup>2</sup> instead of `cmake`
|
Use `ccmake`<sup>2</sup> instead of `cmake`
|
||||||
to see and customize all the available build options.
|
to see and customize all the available build options.
|
||||||
|
|
Loading…
Add table
Reference in a new issue