Skip to content

Commit 5d6587b

Browse files
authored
chore(core): remove jemalloc (#50)
1 parent 288ba2b commit 5d6587b

File tree

1 file changed

+0
-29
lines changed
  • packages/core/bin

1 file changed

+0
-29
lines changed

packages/core/bin/run

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,8 @@
11
#!/usr/bin/env node
22

3-
const child_process = require("child_process");
43
const { existsSync, readdirSync, readJSONSync, statSync } = require("fs-extra");
5-
const glob = require("glob");
64
const { dirname, join } = require("path");
75

8-
const jemallocPath = child_process
9-
.spawnSync(
10-
`ls -d1H $(gcc -print-search-dirs | grep libraries: | awk '{print $2}' | sed -e 's/:/* /g' -e 's/$/*/' -e 's/^.//') | grep libjemalloc.so`,
11-
{ shell: true },
12-
)
13-
.stdout.toString()
14-
.split("\n")
15-
.shift()
16-
.trim();
17-
18-
if (jemallocPath) {
19-
if (process.env.LD_PRELOAD !== jemallocPath) {
20-
process.env.LD_PRELOAD = jemallocPath;
21-
let exitCode = 0;
22-
try {
23-
child_process.execFileSync(process.argv0, process.argv.slice(1), { stdio: [0, 1, 2] });
24-
} catch (error) {
25-
exitCode = error.status;
26-
}
27-
process.exit(exitCode);
28-
}
29-
} else {
30-
console.error(
31-
"The jemalloc library was not found on your system. It is recommended to install it for better memory management. Falling back to the system default...",
32-
);
33-
}
34-
356
const main = async () => {
367
try {
378
const { addAlias } = require("module-alias");

0 commit comments

Comments
 (0)