Allow setting dynamic space size easily at build time, fix #112.

This commit is contained in:
Dimitri Fontaine 2014-10-05 22:10:46 +02:00
parent 1fa9ed3ea0
commit 2d2cc26fca
2 changed files with 14 additions and 2 deletions

View File

@ -62,3 +62,12 @@ It's possible to pick [ccl](http://ccl.clozure.com/) rather than SBCL when
compiling pgloader:
make CL=ccl
## Building pgloader for use in low RAM environments
It's possible to tweak the size of RAM pgloader will use in its binary
image, ac compile time. This defaults to 4 GB.
make DYNSIZE=1024
Now the `./build/bin/pgloader` that you get only uses 1GB.

View File

@ -5,6 +5,9 @@ VERSION = 3.1.0
# use either sbcl or ccl
CL = sbcl
# default to 4096 MB of RAM size in the image
DYNSIZE = 4096
LISP_SRC = $(wildcard src/*lisp) \
$(wildcard src/pgsql/*lisp) \
$(wildcard src/sources/*lisp) \
@ -111,7 +114,7 @@ $(PGLOADER): $(MANIFEST) $(BUILDAPP) $(LISP_SRC)
--load-system $(APP_NAME) \
--load src/hooks.lisp \
--entry pgloader:main \
--dynamic-space-size 4096 \
--dynamic-space-size $(DYNSIZE) \
$(COMPRESS_CORE_OPT) \
--output $@
@ -123,7 +126,7 @@ pgloader-standalone:
--require sb-rotate-byte \
--load-system pgloader \
--entry pgloader:main \
--dynamic-space-size 4096 \
--dynamic-space-size $(DYNSIZE) \
--compress-core \
--output $(PGLOADER)