~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to erts/emulator/beam/erl_vm.h

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * %CopyrightBegin%
3
3
 *
4
 
 * Copyright Ericsson AB 1996-2010. All Rights Reserved.
 
4
 * Copyright Ericsson AB 1996-2011. All Rights Reserved.
5
5
 *
6
6
 * The contents of this file are subject to the Erlang Public License,
7
7
 * Version 1.1, (the "License"); you may not use this file except in
47
47
#define SEQ_TRACE 1
48
48
 
49
49
#define CONTEXT_REDS 2000       /* Swap process out after this number */
50
 
#define MAX_ARG 256             /* Max number of arguments allowed */
 
50
#define MAX_ARG 255             /* Max number of arguments allowed */
51
51
#define MAX_REG 1024            /* Max number of x(N) registers used */
52
52
 
53
53
/* Scheduler stores data for temporary heaps if
55
55
   heap data on the C stack or if we use the buffers in the scheduler data. */
56
56
#define TMP_HEAP_SIZE 128            /* Number of Eterm in the schedulers
57
57
                                        small heap for transient heap data */
58
 
#define CMP_TMP_HEAP_SIZE       2    /* cmp wants its own tmp-heap... */
 
58
#define CMP_TMP_HEAP_SIZE       32   /* cmp wants its own tmp-heap... */
59
59
#define ERL_ARITH_TMP_HEAP_SIZE 4    /* as does erl_arith... */
60
60
#define BEAM_EMU_TMP_HEAP_SIZE  2    /* and beam_emu... */
61
61
 
83
83
#define CP_SIZE 1
84
84
 
85
85
#define ErtsHAllocLockCheck(P) \
86
 
  ERTS_SMP_LC_ASSERT((ERTS_PROC_LOCK_MAIN & erts_proc_lc_my_proc_locks((P))) \
87
 
                     || ((P)->id == ERTS_INVALID_PID) \
88
 
                     || ((P)->scheduler_data \
89
 
                         && (P) == (P)->scheduler_data->match_pseudo_process) \
90
 
                     || erts_is_system_blocked(0))
 
86
  ERTS_SMP_LC_ASSERT(erts_dbg_check_halloc_lock((P)))
91
87
 
92
88
 
93
89
#ifdef DEBUG
120
116
 * Allocate heap memory, first on the ordinary heap;
121
117
 * failing that, in a heap fragment.
122
118
 */
123
 
#define HAlloc(p, sz)                                                 \
 
119
#define HAllocX(p, sz, xtra)                                          \
124
120
    (ASSERT_EXPR((sz) >= 0),                                          \
125
121
     ErtsHAllocLockCheck(p),                                          \
126
122
     (IS_FORCE_HEAP_FRAGS || (((HEAP_LIMIT(p) - HEAP_TOP(p)) < (sz))) \
127
 
      ? erts_heap_alloc((p),(sz))                                     \
 
123
      ? erts_heap_alloc((p),(sz),(xtra))                              \
128
124
      : (INIT_HEAP_MEM(p,sz),                                         \
129
125
         HEAP_TOP(p) = HEAP_TOP(p) + (sz), HEAP_TOP(p) - (sz))))
130
126
 
 
127
#define HAlloc(P, SZ) HAllocX(P,SZ,0)
131
128
 
132
129
#define HRelease(p, endp, ptr)                                  \
133
130
  if ((ptr) == (endp)) {                                        \