diff options
author | Björn-Egil Dahlberg <[email protected]> | 2012-11-02 17:38:46 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-11-13 19:51:11 +0100 |
commit | 770ee09dfbe5c9024432ac8696be6b91d2ec9a9f (patch) | |
tree | 22c95fab7b675d9b5edabf3cbf7fb4a4e6094a99 /erts/emulator/sys/common/erl_mseg.h | |
parent | a758faacea2e77039113995596ad87f67a48eec3 (diff) | |
download | otp-770ee09dfbe5c9024432ac8696be6b91d2ec9a9f.tar.gz otp-770ee09dfbe5c9024432ac8696be6b91d2ec9a9f.tar.bz2 otp-770ee09dfbe5c9024432ac8696be6b91d2ec9a9f.zip |
erts: New mseg allocator cache
* utilize the power of two
Diffstat (limited to 'erts/emulator/sys/common/erl_mseg.h')
-rw-r--r-- | erts/emulator/sys/common/erl_mseg.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/erts/emulator/sys/common/erl_mseg.h b/erts/emulator/sys/common/erl_mseg.h index 741080fb78..644887462a 100644 --- a/erts/emulator/sys/common/erl_mseg.h +++ b/erts/emulator/sys/common/erl_mseg.h @@ -38,6 +38,11 @@ #if HAVE_ERTS_MSEG + +#define ERTS_MSEG_FLG_NONE ((Uint)(0)) +#define ERTS_MSEG_FLG_2POW ((Uint)(1 << 0)) + + #define ERTS_MSEG_VSN_STR "0.9" typedef struct { @@ -68,13 +73,13 @@ typedef struct { extern const ErtsMsegOpt_t erts_mseg_default_opt; -void *erts_mseg_alloc(ErtsAlcType_t, Uint *); -void *erts_mseg_alloc_opt(ErtsAlcType_t, Uint *, const ErtsMsegOpt_t *); +void *erts_mseg_alloc(ErtsAlcType_t, Uint *, Uint); +void *erts_mseg_alloc_opt(ErtsAlcType_t, Uint *, Uint, const ErtsMsegOpt_t *); void erts_mseg_dealloc(ErtsAlcType_t, void *, Uint); void erts_mseg_dealloc_opt(ErtsAlcType_t, void *, Uint, const ErtsMsegOpt_t *); -void *erts_mseg_realloc(ErtsAlcType_t, void *, Uint, Uint *); +void *erts_mseg_realloc(ErtsAlcType_t, void *, Uint, Uint *, Uint); void *erts_mseg_realloc_opt(ErtsAlcType_t, void *, Uint, Uint *, - const ErtsMsegOpt_t *); + Uint, const ErtsMsegOpt_t *); void erts_mseg_clear_cache(void); void erts_mseg_cache_check(void); Uint erts_mseg_no( const ErtsMsegOpt_t *); |