Age | Commit message (Collapse) | Author |
|
|
|
26b59dfe67 introduced the new 'AtU8' chunk to support
Unicode atoms.
make_preload strips the pre-loaded BEAM files so that they
only contain essential chunks. It expects to find the old
'Atom' chunk.
Teach make_preload to read the new 'AtU8' chunk instead of the old
chunk. Also produce a nice error message if someone by mistake
compiles the pre-loaded modules with an OTP 19 compiler.
|
|
Mark the preloaded code 'const' to allow the compiler to put it into
the 'text' segment instead of into the 'data' segment. Since the
'text' segment is shared among all instances of the Erlang virtual
machine, this change could potentially reduce memory consumption
(slightly).
Before the change:
$ size bin/x86_64-unknown-linux-gnu/beam.smp
text data bss dec hex filename
2920246 352273 158472 3430991 345a4f bin/x86_64-unknown-linux-gnu/beam.smp
After the change:
$ size bin/x86_64-unknown-linux-gnu/beam.smp
text data bss dec hex filename
3081046 191473 158472 3430991 345a4f bin/x86_64-unknown-linux-gnu/beam.smp
Roughly speaking, this change cuts the size of the data segment in half.
|
|
|
|
|
|
|
|
Setting Perl's default encoding for files to UTF-8, for example
like this:
PERL_UNICODE=DS make
would crash the build with a message similar to:
form size 1413 greater than size 1237 of module at
utils/make_preload line 175, <FILE> chunk 1.
Tell Perl to interpret the data in BEAM files as binary by
using the binmode() function. The binmode() function existed
before Unicode support was added to Perl, which means that
make_preload should work even in old versions of Perl.
Noticed-by: Aaron Harnly
|
|
|
|
Still does not run, just compiles.
|
|
We already avoid outputting a comment terminator ("*/") inside
a comment to avoid causing a syntax error. Also avoid outputting
the start of a comment ("/*") to avoid causing a compiler warning.
Noticed-by: Tuncer Ayaz
|
|
|