---
title: 指定jemalloc
description: "毕昇编译器支持jemalloc库的使用，jemalloc是一个通用的malloc实现，主要是为了减少内存碎片和提高并发性能，以动态库的方式集成到工具链中。使用示例如下："
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevkithistory/bisheng/hist-bisheng/kunpengbisheng_06_0011_1.html
sourcePath: /source/zh/kunpengdevkithistory/bisheng/hist-bisheng/kunpengbisheng_06_0011_1.html
indexId: 55711fa527062c058d2647b93d0ffe7ee25655f4dd6de9fb0f5cf5b51c101b6282
---
# 指定jemalloc

毕昇编译器支持jemalloc库的使用，jemalloc是一个通用的malloc实现，主要是为了减少内存碎片和提高并发性能，以动态库的方式集成到工具链中。使用示例如下：

```
clang -O3 -ljemalloc
```

jemalloc的动态链接库文件存放于BiShengCompiler-5.1.0-aarch64-linux/lib文件中，加入LD_LIBRARY_PATH后才能在运行时顺利使能该优化，否则在运行时可能会找不到对应的动态库。
