aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2015-11-12 15:44:56 +0100
committerRickard Green <[email protected]>2015-11-12 15:44:56 +0100
commitef72a791f4dc9a1816ac8ff95a612409b86de818 (patch)
tree495fd4968a7794cb150754cf1acf3c6b79dc7d30 /erts/emulator/hipe
parent0a4d4450d2143ca824644c6da96f98fc95811e3e (diff)
parent7858ca939f8bf2db918396616fee13364d150a1e (diff)
downloadotp-ef72a791f4dc9a1816ac8ff95a612409b86de818.tar.gz
otp-ef72a791f4dc9a1816ac8ff95a612409b86de818.tar.bz2
otp-ef72a791f4dc9a1816ac8ff95a612409b86de818.zip
Merge branch 'sverk/literal-memory-range'
* sverk/literal-memory-range: erts: Refactor line table in loaded beam code erts: Refactor header of loaded beam code fix check_process_code for separate literal area erts: Add support for fast erts_is_literal() erts: Refactor erl_mmap to allow several mapper instances erts: Add new allocator LITERAL erts: Fix strangeness in treatment of MSEG_ALIGN_BITS erts: Cleanup main carrier creation erts: Remove unused erts_have_erts_mmap erts: Refactor config test for posix_memalign
Diffstat (limited to 'erts/emulator/hipe')
-rw-r--r--erts/emulator/hipe/hipe_bif0.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index cc68e1f74d..c6ea8a5132 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -488,7 +488,7 @@ static void *const_term_alloc(void *tmpl)
alloc_size = size + (offsetof(struct const_term, mem)/sizeof(Eterm));
hipe_constants_size += alloc_size;
- p = (struct const_term*)erts_alloc(ERTS_ALC_T_HIPE, alloc_size * sizeof(Eterm));
+ p = (struct const_term*)erts_alloc(ERTS_ALC_T_LITERAL, alloc_size * sizeof(Eterm));
/* I have absolutely no idea if having a private 'off_heap'
works or not. _Some_ off_heap object is required for
@@ -574,15 +574,15 @@ static void print_mfa(Eterm mod, Eterm fun, unsigned int ari)
static Uint *hipe_find_emu_address(Eterm mod, Eterm name, unsigned int arity)
{
Module *modp;
- Uint *code_base;
+ BeamCodeHeader* code_hdr;
int i, n;
modp = erts_get_module(mod, erts_active_code_ix());
- if (modp == NULL || (code_base = modp->curr.code) == NULL)
+ if (modp == NULL || (code_hdr = modp->curr.code_hdr) == NULL)
return NULL;
- n = code_base[MI_NUM_FUNCTIONS];
+ n = code_hdr->num_functions;
for (i = 0; i < n; ++i) {
- Uint *code_ptr = (Uint*)code_base[MI_FUNCTIONS+i];
+ Uint *code_ptr = (Uint*)code_hdr->functions[i];
ASSERT(code_ptr[0] == BeamOpCode(op_i_func_info_IaaI));
if (code_ptr[3] == name && code_ptr[4] == arity)
return code_ptr+5;