aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_ptab.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2013-05-30 14:56:31 +0200
committerRickard Green <[email protected]>2013-05-30 14:56:31 +0200
commite794251f8e54d6697e1bcc360471fd76b20c7748 (patch)
tree0a776b2b9c22622e09b7381eea15e106d5da7e90 /erts/emulator/beam/erl_ptab.h
parent22685099ace9802016bf6203c525702084717d72 (diff)
parent5c039a1fb4979314912dc3af6626d8d7a1c73993 (diff)
downloadotp-e794251f8e54d6697e1bcc360471fd76b20c7748.tar.gz
otp-e794251f8e54d6697e1bcc360471fd76b20c7748.tar.bz2
otp-e794251f8e54d6697e1bcc360471fd76b20c7748.zip
Merge branch 'rickard/ptab-id-alloc/OTP-11077' into maint
* rickard/ptab-id-alloc/OTP-11077: Introduce a better id allocation algorithm for PTabs
Diffstat (limited to 'erts/emulator/beam/erl_ptab.h')
-rw-r--r--erts/emulator/beam/erl_ptab.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_ptab.h b/erts/emulator/beam/erl_ptab.h
index 7fa1251900..84ff7d0de4 100644
--- a/erts/emulator/beam/erl_ptab.h
+++ b/erts/emulator/beam/erl_ptab.h
@@ -94,18 +94,23 @@ typedef struct {
erts_smp_atomic_t last_data;
#endif
erts_smp_atomic32_t count;
+ erts_smp_atomic32_t aid_ix;
+ erts_smp_atomic32_t fid_ix;
} ErtsPTabVolatileData;
typedef struct {
erts_smp_atomic_t *tab;
+ Uint32 *free_id_data;
Uint32 max;
- Uint32 tab_cache_lines;
- Uint32 pix_per_cache_line;
Uint32 pix_mask;
Uint32 pix_cl_mask;
Uint32 pix_cl_shift;
Uint32 pix_cli_mask;
Uint32 pix_cli_shift;
+ Uint32 dix_cl_mask;
+ Uint32 dix_cl_shift;
+ Uint32 dix_cli_mask;
+ Uint32 dix_cli_shift;
ErtsPTabElementCommon *invalid_element;
Eterm invalid_data;
void (*release_element)(void *);
@@ -179,7 +184,8 @@ void erts_ptab_init_table(ErtsPTab *ptab,
ErtsPTabElementCommon *invalid_element,
int size,
UWord element_size,
- char *name);
+ char *name,
+ int legacy);
int erts_ptab_new_element(ErtsPTab *ptab,
ErtsPTabElementCommon *ptab_el,
void *init_arg,
@@ -187,6 +193,7 @@ int erts_ptab_new_element(ErtsPTab *ptab,
void erts_ptab_delete_element(ErtsPTab *ptab,
ErtsPTabElementCommon *ptab_el);
int erts_ptab_initialized(ErtsPTab *ptab);
+UWord erts_ptab_mem_size(ErtsPTab *ptab);
ERTS_GLB_INLINE erts_interval_t *erts_ptab_interval(ErtsPTab *ptab);
ERTS_GLB_INLINE int erts_ptab_max(ErtsPTab *ptab);