help with: Immobile code space exhausted
Andrew Wolven <[email protected]> Thu, 18 Jun 2026 10:00:17 -0500
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <CANhGVvRYrkYcDK_gNgM-c9SscGAwx=mf17_TS0Oc+DPHsncJBg@mail.gmail.com> |
--===============8690146910441563845==
Content-Type: multipart/alternative; boundary="000000000000e1636d0654886f4b"
--000000000000e1636d0654886f4b
Content-Type: text/plain; charset="UTF-8"
I'm writing because trial and error is extremely time consuming. The files
I have to load to get to this error take 21 minutes to load on my computer,
and then I have to rebuild sbcl. So round trips for replicating this error
take about 30 minutes.
I am on sbcl-2.6.4 (WIP commit) on Windows on x64-64.
I have source code files which define bindings, which probably equates to
about 60,000 foreign function definitions and several hundred
callback definitions, and is about 300 mb of source. I also have many
string constants which are different. I could probably make the number of
string constants smaller, but at some later time.
I'm trying to rebuild sbcl to have suitable values for the space sizes to
avoid this error.
The error occurs after I load the bindings and DLLs, one compile of the
bindings test files is ok, and the tests run, but if I compile the bindings
test file again I hit this Immoble space error.
The bindings test file does not define any more bindings, it just calls
foreign functions and accepts callbacks. I don't need to actually run the
code in the test file to hit the error, as I said just compiling that file
twice will trigger the problem. The bindings work, but that is aside the
point.
Could someone familiar with tweaking these various memory space sizes in
the sbcl build give me some hints on what numbers to change before I spend
several more hours doing trial and error?
Thanks,
Andrew Wolven
Here is the backtrace:
Immobile code space exhausted
[Condition of type SIMPLE-ERROR]
Restarts:
0: [*ABORT] Return to SLY's top level.
1: [ABORT] abort thread (#<THREAD tid=85460 "slynk-worker" RUNNING
{164330F2B3}>)
Backtrace:
0: (SB-C:ALLOCATE-CODE-OBJECT :IMMOBILE 5 120)
1: (SB-FASL::FOP-LOAD-CODE #S(SB-FASL::FASL-INPUT :STREAM
#<SB-SYS:FD-STREAM for "file h:\\cxxbinder\\clanglite\\clanglite-test.fasl"
{16682F0533}> :TABLE #(7595 "h:/cxxbinder/clanglite/clanglite-test.li..
2: (SB-FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM
#<SB-SYS:FD-STREAM for "file h:\\cxxbinder\\clanglite\\clanglite-test.fasl"
{16682F0533}> :TABLE #(7595 "h:/cxxbinder/clanglite/clanglite-test...
3: ((LAMBDA NIL :IN SB-FASL::LOAD-AS-FASL))
4: (SB-IMPL::CALL-WITH-LOADER-PACKAGE-NAMES #<FUNCTION (LAMBDA NIL :IN
SB-FASL::LOAD-AS-FASL) {16682F37AB}>)
5: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file
h:\\cxxbinder\\clanglite\\clanglite-test.fasl" {16682F0533}> NIL NIL)
6: ((LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) #<SB-SYS:FD-STREAM for "file
h:\\cxxbinder\\clanglite\\clanglite-test.fasl" {16682F0533}> T)
7: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<FUNCTION (LABELS
SB-FASL::LOAD-STREAM-1 :IN LOAD) {3B1D6F08B}> #<SB-SYS:FD-STREAM for "file
h:\\cxxbinder\\clanglite\\clanglite-test.fasl" {16682F0533}> T #<SB-SYS:..
8: (LOAD #P"h:/cxxbinder/clanglite/clanglite-test.fasl" :VERBOSE NIL
:PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)
--more--
--000000000000e1636d0654886f4b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">I'm writing because trial and error is extremely time =
consuming.=C2=A0 The files I have to load to get to this error take 21 minu=
tes to load on my computer, and then I have to rebuild sbcl.=C2=A0 So round=
trips for replicating this error take about 30 minutes.<div><br></div><div=
>I am on sbcl-2.6.4 (WIP commit) on Windows on x64-64.</div><div><br></div>=
<div>I have source code files which define bindings, which probably equates=
to about 60,000 foreign function definitions and several hundred callback=
=C2=A0definitions, and is about 300 mb of source.=C2=A0 I also have many st=
ring=C2=A0constants which are different.=C2=A0 I could probably make the nu=
mber of string constants smaller, but at some later time.</div><div><br></d=
iv><div>I'm trying to rebuild sbcl to have suitable values for the spac=
e sizes to avoid this error.</div><div><br></div><div>The error occurs=C2=
=A0after I load the bindings and=C2=A0DLLs, one compile of the bindings tes=
t files is ok, and the tests run, but if I compile the bindings test file a=
gain I hit this Immoble space error.</div><div><br></div><div>The bindings =
test file does not define any more bindings, it just calls foreign function=
s and accepts callbacks.=C2=A0 I don't need to actually run the code in=
the test file to hit the error, as I said just compiling that file twice w=
ill trigger the problem.=C2=A0 The bindings work, but that is aside the poi=
nt.</div><div><br></div><div>Could someone familiar with tweaking these var=
ious memory space sizes in the sbcl build give me some hints on what number=
s to change before I spend several more hours doing trial and error?</div><=
div><br></div><div>Thanks,</div><div>Andrew Wolven</div><div><br></div><div=
>Here is the backtrace:</div><div><br></div><div>Immobile code space exhaus=
ted<br>=C2=A0 =C2=A0[Condition of type SIMPLE-ERROR]<br><br>Restarts:<br>=
=C2=A00: [*ABORT] Return to SLY's top level.<br>=C2=A01: [ABORT] abort =
thread (#<THREAD tid=3D85460 "slynk-worker" RUNNING {164330F2B=
3}>)<br><br>Backtrace:<br>=C2=A00: (SB-C:ALLOCATE-CODE-OBJECT :IMMOBILE =
5 120)<br>=C2=A01: (SB-FASL::FOP-LOAD-CODE #S(SB-FASL::FASL-INPUT :STREAM #=
<SB-SYS:FD-STREAM for "file h:\\cxxbinder\\clanglite\\clanglite-tes=
t.fasl" {16682F0533}> :TABLE #(7595 "h:/cxxbinder/clanglite/<a=
href=3D"http://clanglite-test.li">clanglite-test.li</a>..<br>=C2=A02: (SB-=
FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM #<SB-SYS:FD-STREAM =
for "file h:\\cxxbinder\\clanglite\\clanglite-test.fasl" {16682F0=
533}> :TABLE #(7595 "h:/cxxbinder/clanglite/clanglite-test...<br>=
=C2=A03: ((LAMBDA NIL :IN SB-FASL::LOAD-AS-FASL))<br>=C2=A04: (SB-IMPL::CAL=
L-WITH-LOADER-PACKAGE-NAMES #<FUNCTION (LAMBDA NIL :IN SB-FASL::LOAD-AS-=
FASL) {16682F37AB}>)<br>=C2=A05: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-S=
TREAM for "file h:\\cxxbinder\\clanglite\\clanglite-test.fasl" {1=
6682F0533}> NIL NIL)<br>=C2=A06: ((LABELS SB-FASL::LOAD-STREAM-1 :IN LOA=
D) #<SB-SYS:FD-STREAM for "file h:\\cxxbinder\\clanglite\\clanglite=
-test.fasl" {16682F0533}> T)<br>=C2=A07: (SB-FASL::CALL-WITH-LOAD-B=
INDINGS #<FUNCTION (LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) {3B1D6F08B}&=
gt; #<SB-SYS:FD-STREAM for "file h:\\cxxbinder\\clanglite\\clanglit=
e-test.fasl" {16682F0533}> T #<SB-SYS:..<br>=C2=A08: (LOAD #P&qu=
ot;h:/cxxbinder/clanglite/clanglite-test.fasl" :VERBOSE NIL :PRINT NIL=
:IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)<br>=C2=A0--more--</di=
v></div>
--000000000000e1636d0654886f4b--
--===============8690146910441563845==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============8690146910441563845==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help
--===============8690146910441563845==--