Quantcast

/usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

/usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

David Wolfskill
I update my local mirror of the SVN repo nightly, then use it to track
stable/8, stable/9, and head in the mornings -- both on my laptop & on
my local build machine.

While that usually "just works," head has been a bit more turbulent in
the last few days.

My last successful build of head is reflected in:

FreeBSD g1-227.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #537 234416M: Wed Apr 18 05:35:03 PDT 2012     [hidden email]:/usr/obj/usr/src/sys/CANARY  i386

(I note that I have not attempted to migrate to using clang/llvm
to perform the build.)

The update after 234416 was to 234454; the attempted buildworld failed:

--------------------------------------------------------------
>>> Building an up-to-date make(1)
--------------------------------------------------------------
cc -O2 -pipe -I/usr/src/usr.bin/make -DMAKE_VERSION=\"5201111300\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /usr/src/usr.bin/make/arch.c
cc -O2 -pipe -I/usr/src/usr.bin/make -DMAKE_VERSION=\"5201111300\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /usr/src/usr.bin/make/buf.c
...
===> tools/build (obj,includes,depend,all,install)
cd /usr/src/tools/build; /usr/obj/usr/src/make.i386/make buildincludes; /usr/obj/usr/src/make.i386/make installincludes
sh /usr/src/tools/install.sh -C -o root -g wheel -m 444   libegacy.a /usr/obj/usr/src/tmp/legacy/usr/lib
--------------------------------------------------------------
>>> stage 1.2: bootstrap tools
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/src/tmp  VERSION="FreeBSD 10.0-CURRENT i386 1000011"  MAKEFLAGS="-m /usr/src/tools/build/mk  -j 4 -D NOCLEAN -m /usr/src/share/mk TARGET=i386 TARGET_ARCH=i386" /usr/obj/usr/src/make.i386/make -f Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1000011  SSP_CFLAGS=  -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN  -DNO_PIC -DNO_PROFILE -DNO_SHARED  -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF bootstrap-tools
===> lib/clang/libllvmsupport (obj,depend,all,install)
...
c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Main.cpp
c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TableGenBackend.cpp
c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Record.cpp
c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGLexer.cpp
c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGParser.cpp

/usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes
*** [Record.o] Error code 1
1 error
*** [bootstrap-tools] Error code 2
1 error
*** [_bootstrap-tools] Error code 2
1 error
*** [buildworld] Error code 2
1 error


This morning, after updating the repo & the head working copy to 234489,
I'm still seeing the same problem.  (And this is on both the laptop & the
build machine.)

So at this point, I suspect that something was built "successfully"
(perhaps as recently as Wednesday, 18 Apr) that doesn't actually
work quite right.

I have access to a machine at work that I had last updated to head
as of 234311 (15 Apr; also i386), so I should be able to grab files
from it, if appropriate.

But I could use a clue or two.

Thanks!

Peace,
david
--
David H. Wolfskill [hidden email]
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

Michael Pounov-2
yep, I sent PR for this issue;)

http://www.freebsd.org/cgi/query-pr.cgi?pr=167064


On Fri, 20 Apr 2012 05:57:18 -0700
David Wolfskill <[hidden email]> wrote:

> I update my local mirror of the SVN repo nightly, then use it to track
> stable/8, stable/9, and head in the mornings -- both on my laptop & on
> my local build machine.
>
> While that usually "just works," head has been a bit more turbulent in
> the last few days.
>
> My last successful build of head is reflected in:
>
> FreeBSD g1-227.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #537 234416M: Wed Apr 18 05:35:03 PDT 2012     [hidden email]:/usr/obj/usr/src/sys/CANARY  i386
>
> (I note that I have not attempted to migrate to using clang/llvm
> to perform the build.)
>
> The update after 234416 was to 234454; the attempted buildworld failed:
>
> --------------------------------------------------------------
> >>> Building an up-to-date make(1)
> --------------------------------------------------------------
> cc -O2 -pipe -I/usr/src/usr.bin/make -DMAKE_VERSION=\"5201111300\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /usr/src/usr.bin/make/arch.c
> cc -O2 -pipe -I/usr/src/usr.bin/make -DMAKE_VERSION=\"5201111300\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -c /usr/src/usr.bin/make/buf.c
> ...
> ===> tools/build (obj,includes,depend,all,install)
> cd /usr/src/tools/build; /usr/obj/usr/src/make.i386/make buildincludes; /usr/obj/usr/src/make.i386/make installincludes
> sh /usr/src/tools/install.sh -C -o root -g wheel -m 444   libegacy.a /usr/obj/usr/src/tmp/legacy/usr/lib
> --------------------------------------------------------------
> >>> stage 1.2: bootstrap tools
> --------------------------------------------------------------
> cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/src/tmp  VERSION="FreeBSD 10.0-CURRENT i386 1000011"  MAKEFLAGS="-m /usr/src/tools/build/mk  -j 4 -D NOCLEAN -m /usr/src/share/mk TARGET=i386 TARGET_ARCH=i386" /usr/obj/usr/src/make.i386/make -f Makefile.inc1  DESTDIR=  BOOTSTRAPPING=1000011  SSP_CFLAGS=  -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN  -DNO_PIC -DNO_PROFILE -DNO_SHARED  -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF bootstrap-tools
> ===> lib/clang/libllvmsupport (obj,depend,all,install)
> ...
> c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Main.cpp
> c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TableGenBackend.cpp
> c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/Record.cpp
> c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGLexer.cpp
> c++ -O2 -pipe -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I. -I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fno-strict-aliasing -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd10.0\" -I/usr/obj/usr/src/tmp/legacy/usr/include -c /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGParser.cpp
>
> /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes
> *** [Record.o] Error code 1
> 1 error
> *** [bootstrap-tools] Error code 2
> 1 error
> *** [_bootstrap-tools] Error code 2
> 1 error
> *** [buildworld] Error code 2
> 1 error
>
>
> This morning, after updating the repo & the head working copy to 234489,
> I'm still seeing the same problem.  (And this is on both the laptop & the
> build machine.)
>
> So at this point, I suspect that something was built "successfully"
> (perhaps as recently as Wednesday, 18 Apr) that doesn't actually
> work quite right.
>
> I have access to a machine at work that I had last updated to head
> as of 234311 (15 Apr; also i386), so I should be able to grab files
> from it, if appropriate.
>
> But I could use a clue or two.
>
> Thanks!
>
> Peace,
> david
> --
> David H. Wolfskill [hidden email]
> Depriving a girl or boy of an opportunity for education is evil.
>
> See http://www.catwhisker.org/~david/publickey.gpg for my public key.


--
Michael Pounov <[hidden email]>
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

Dimitry Andric-4
On 2012-04-20 15:55, Michael Pounov wrote:
> On Fri, 20 Apr 2012 05:57:18 -0700
> David Wolfskill<[hidden email]>  wrote:
...
>> The update after 234416 was to 234454; the attempted buildworld failed:
...
>> /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes
> yep, I sent PR for this issue;)
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=167064

The root cause of this is the new jemalloc import in r234370.  In
contrib/jemalloc/src/chunk.c, this defines a global variable called
'chunksize'.  At run-time, this turns out to have a value of 4194304, at
least on my i386 system.

However, GNU as *also* has a global variable called 'chunksize', with a
very different intent: it is the default chunk size for its so-called
"obstacks", an internal implementation detail.  It is set to zero in
contrib/binutils/gas/as.c, but normally ends up as 4096 during further
initialization.

Now, because the variable from jemalloc ends up in libc.a, and
/usr/bin/as is statically linked, the jemalloc variable overrides the
one from GNU as.  This causes as to allocate 4 MiB chunks instead of 4
KiB chunks for all its internal processing, and you can guess what
happens with a reasonably large input file. :)

I think the best solution would be for jemalloc to avoid using obvious
names like "chunksize" for its globals, because it is basically a
library that could be linked to any sort of program out there.

For example, it could prefix all its internal-use only globals with
"jemalloc_" or some other mangling scheme.  Jason, any thoughts?
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

Jason Evans-2
On Apr 20, 2012, at 12:49 PM, Dimitry Andric wrote:

> On 2012-04-20 15:55, Michael Pounov wrote:
>> On Fri, 20 Apr 2012 05:57:18 -0700
>> David Wolfskill<[hidden email]>  wrote:
> ...
>>> The update after 234416 was to 234454; the attempted buildworld failed:
> ...
>>> /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes
>> yep, I sent PR for this issue;)
>>
>> http://www.freebsd.org/cgi/query-pr.cgi?pr=167064
>
> The root cause of this is the new jemalloc import in r234370.  In
> contrib/jemalloc/src/chunk.c, this defines a global variable called
> 'chunksize'.  At run-time, this turns out to have a value of 4194304, at
> least on my i386 system.
>
> However, GNU as *also* has a global variable called 'chunksize', with a
> very different intent: it is the default chunk size for its so-called
> "obstacks", an internal implementation detail.  It is set to zero in
> contrib/binutils/gas/as.c, but normally ends up as 4096 during further
> initialization.
>
> Now, because the variable from jemalloc ends up in libc.a, and
> /usr/bin/as is statically linked, the jemalloc variable overrides the
> one from GNU as.  This causes as to allocate 4 MiB chunks instead of 4
> KiB chunks for all its internal processing, and you can guess what
> happens with a reasonably large input file. :)
>
> I think the best solution would be for jemalloc to avoid using obvious
> names like "chunksize" for its globals, because it is basically a
> library that could be linked to any sort of program out there.
>
> For example, it could prefix all its internal-use only globals with
> "jemalloc_" or some other mangling scheme.  Jason, any thoughts?

jemalloc has optional namespace mangling support built in for just this reason.  I'll turn it on, hopefully today.

Thanks,
Jason_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

Dimitry Andric-4
On 2012-04-20 21:54, Jason Evans wrote:
> On Apr 20, 2012, at 12:49 PM, Dimitry Andric wrote:
...
>> I think the best solution would be for jemalloc to avoid using obvious
>> names like "chunksize" for its globals, because it is basically a
>> library that could be linked to any sort of program out there.
>>
>> For example, it could prefix all its internal-use only globals with
>> "jemalloc_" or some other mangling scheme.  Jason, any thoughts?
>
> jemalloc has optional namespace mangling support built in for just this reason.  I'll turn it on, hopefully today.

Indeed, I had just found jemalloc/internal/private_namespace.h. :)  It
does seem to list only functions, not variables, is that right?
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

Jason Evans-2
On Apr 20, 2012, at 1:10 PM, Dimitry Andric wrote:

> On 2012-04-20 21:54, Jason Evans wrote:
>> On Apr 20, 2012, at 12:49 PM, Dimitry Andric wrote:
> ...
>>> I think the best solution would be for jemalloc to avoid using obvious
>>> names like "chunksize" for its globals, because it is basically a
>>> library that could be linked to any sort of program out there.
>>>
>>> For example, it could prefix all its internal-use only globals with
>>> "jemalloc_" or some other mangling scheme.  Jason, any thoughts?
>>
>> jemalloc has optional namespace mangling support built in for just this reason.  I'll turn it on, hopefully today.
>
> Indeed, I had just found jemalloc/internal/private_namespace.h. :)  It
> does seem to list only functions, not variables, is that right?

Ah right, functions only.  Well then, I don't have any bright ideas for solving this problem in the short run.

Jason_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

Jason Evans
On Apr 20, 2012, at 1:14 PM, Jason Evans wrote:

> On Apr 20, 2012, at 1:10 PM, Dimitry Andric wrote:
>> On 2012-04-20 21:54, Jason Evans wrote:
>>> On Apr 20, 2012, at 12:49 PM, Dimitry Andric wrote:
>>>> I think the best solution would be for jemalloc to avoid using obvious
>>>> names like "chunksize" for its globals, because it is basically a
>>>> library that could be linked to any sort of program out there.
>>>>
>>>> For example, it could prefix all its internal-use only globals with
>>>> "jemalloc_" or some other mangling scheme.  Jason, any thoughts?
>>>
>>> jemalloc has optional namespace mangling support built in for just this reason.  I'll turn it on, hopefully today.
>>
>> Indeed, I had just found jemalloc/internal/private_namespace.h. :)  It
>> does seem to list only functions, not variables, is that right?
>
> Ah right, functions only.  Well then, I don't have any bright ideas for solving this problem in the short run.

I take it back.  There's spotty mangling coverage for variables.  I'll try to add full coverage.

Jason_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

dougb
In reply to this post by Jason Evans-2
On 04/20/2012 01:14 PM, Jason Evans wrote:

> On Apr 20, 2012, at 1:10 PM, Dimitry Andric wrote:
>> On 2012-04-20 21:54, Jason Evans wrote:
>>> On Apr 20, 2012, at 12:49 PM, Dimitry Andric wrote:
>> ...
>>>> I think the best solution would be for jemalloc to avoid using obvious
>>>> names like "chunksize" for its globals, because it is basically a
>>>> library that could be linked to any sort of program out there.
>>>>
>>>> For example, it could prefix all its internal-use only globals with
>>>> "jemalloc_" or some other mangling scheme.  Jason, any thoughts?
>>>
>>> jemalloc has optional namespace mangling support built in for just this reason.  I'll turn it on, hopefully today.
>>
>> Indeed, I had just found jemalloc/internal/private_namespace.h. :)  It
>> does seem to list only functions, not variables, is that right?
>
> Ah right, functions only.  Well then, I don't have any bright ideas for solving this problem in the short run.

Prefixing your variables sounds right to me ... I'd use jem_ instead of
spelling out jemalloc_, but either should work.

Doug
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

Dimitry Andric-4
In reply to this post by Jason Evans
On 2012-04-20 22:21, Jason Evans wrote:

> On Apr 20, 2012, at 1:14 PM, Jason Evans wrote:
>> On Apr 20, 2012, at 1:10 PM, Dimitry Andric wrote:
>>> On 2012-04-20 21:54, Jason Evans wrote:
>>>> On Apr 20, 2012, at 12:49 PM, Dimitry Andric wrote:
>>>>> I think the best solution would be for jemalloc to avoid using obvious
>>>>> names like "chunksize" for its globals, because it is basically a
>>>>> library that could be linked to any sort of program out there.
>>>>>
>>>>> For example, it could prefix all its internal-use only globals with
>>>>> "jemalloc_" or some other mangling scheme.  Jason, any thoughts?
>>>>
>>>> jemalloc has optional namespace mangling support built in for just this reason.  I'll turn it on, hopefully today.
>>>
>>> Indeed, I had just found jemalloc/internal/private_namespace.h. :)  It
>>> does seem to list only functions, not variables, is that right?
>>
>> Ah right, functions only.  Well then, I don't have any bright ideas for solving this problem in the short run.
>
> I take it back.  There's spotty mangling coverage for variables.  I'll try to add full coverage.
I'm now using the attached.  It seems to work...

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"

jemalloc-mangle-1.diff (6K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: /usr/bin/as: out of memory allocating 4194304 bytes after a total of 524288000 bytes

Julian Elischer-5
On 4/20/12 1:37 PM, Dimitry Andric wrote:

> On 2012-04-20 22:21, Jason Evans wrote:
>> On Apr 20, 2012, at 1:14 PM, Jason Evans wrote:
>>> On Apr 20, 2012, at 1:10 PM, Dimitry Andric wrote:
>>>> On 2012-04-20 21:54, Jason Evans wrote:
>>>>> On Apr 20, 2012, at 12:49 PM, Dimitry Andric wrote:
>>>>>> I think the best solution would be for jemalloc to avoid using
>>>>>> obvious
>>>>>> names like "chunksize" for its globals, because it is basically a
>>>>>> library that could be linked to any sort of program out there.
>>>>>>
>>>>>> For example, it could prefix all its internal-use only globals
>>>>>> with
>>>>>> "jemalloc_" or some other mangling scheme.  Jason, any thoughts?
>>>>>
>>>>> jemalloc has optional namespace mangling support built in for
>>>>> just this reason.  I'll turn it on, hopefully today.
>>>>
>>>> Indeed, I had just found jemalloc/internal/private_namespace.h.
>>>> :)  It
>>>> does seem to list only functions, not variables, is that right?

We do that with our driver..  variables and functions..
the symbols are all mangled in the .o file.

>>>
>>> Ah right, functions only.  Well then, I don't have any bright
>>> ideas for solving this problem in the short run.
>>
>> I take it back.  There's spotty mangling coverage for variables.  
>> I'll try to add full coverage.
>
> I'm now using the attached.  It seems to work...
>
>
> _______________________________________________
> [hidden email] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "[hidden email]"

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[hidden email]"
Loading...