aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe
AgeCommit message (Collapse)Author
2010-08-13fix hipe_bifs_alloc_data_2 to avoid "Yikes!" warningMikael Pettersson
It's been reported that HiPE-enabled Erlang VMs running on BSD systems sometimes generate messages like Yikes! erts_alloc() returned misaligned address 0x8016a512c These originate from hipe_bif0.c:hipe_bifs_alloc_data_2(). A native code module has an associated data area of some size and alignment. In the case where the size is zero, the alignment is irrelevant, but the allocation BIF checks it anyway. The warning then triggers on systems where malloc(0) returns blocks with less alignment than we (erroneously) expected. The fix is to simply skip the allocation in this case and return NULL. The loader won't actually use the address in this case so that's safe. This is also an optimization since it avoids allocating memory that cannot be used, and it avoids fragmenting the system heap with useless tiny blocks. A second problem is that the warning message failed to identify its origin. Fixed by prefixing the message by the BIF's name rather than the silly Yikes! string. Tested and confirmed to solve the original reporter's problem.
2010-07-20One off-heap list, to eliminate two words per ETS object.Sverker Eriksson
Merging the three off-heap lists (binaries, funs and externals) into one list. This reduces memory consumption by two words (pointers) per ETS object.
2010-06-03OTP-8555 Send message from NIFSverker Eriksson
New NIF features: Send messages from a NIF, or from thread created by NIF, to any local process (enif_send) Store terms between NIF calls (enif_alloc_env, enif_make_copy) Create binary terms with user defined memory management (enif_make_resource_binary)
2010-02-11hipe_bif0.c: Remove $Id$Kostis Sagonas
2010-02-08Merge branch 'gc/hipe_darwin_amd64' into ccase/r13b04_devErlang/OTP
* gc/hipe_darwin_amd64: Fix hipe memory allocation problems on darwin/amd64 Porting x86 darwin fixes to amd64 darwin hipe asm/m4 code Automatically enable hipe for darwin/amd64 builds Allow configure to enable_hipe for darwin/amd64 builds OTP-8416 HiPE now works in the 64-bit emulator on Mac OS X. (Thanks to Geoff Cant.)
2010-02-06Porting x86 darwin fixes to amd64 darwin hipe asm/m4 codeGeoff Cant
Compared to GNU as, Mac OS X's assembler uses different directives for text and global sections, and omits type and size directives entirely. We also need to mangle symbol names in order to allow linking with C object files.
2010-01-30Merge branch 'mp/hipe-smp-fixes' into ccase/r13b04_devErlang/OTP
* mp/hipe-smp-fixes: work around hipe_mfa_info_table lock omission fix hipe loader SMP non-atomicity error OTP-8397 The loading of native code was not properly atomic in the SMP emulator, which could cause crashes. Also a per-MFA information table for the native code has now been protected with a lock since it turns that it could be accessed concurrently in the SMP emulator. (Thanks to Mikael Pettersson.)
2010-01-27work around hipe_mfa_info_table lock omissionMikael Pettersson
HiPE maintains per-MFA information such as native code entry point in a table. This table was thought to be read-only at runtime, except when the loader populates it, so it employed no locking. That turned out to be incorrect: if there is an apply of a previously unseen MFA, a native code stub for that MFA is created and recorded in the table, causing it to grow. Work around this for now by slapping a mutex around accesses to that table. Signed-off-by: Mikael Pettersson <[email protected]>
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP