aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-01-14 18:21:26 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-01-29 11:08:46 +0100
commita18853e6814ab42188e56343e6363ff94c794bb8 (patch)
treee003a448592f06f2b4bd8ed71e43a35c5bc4e18a
parent00f9be42e43913bce9b110382e55bfbdaa9406d0 (diff)
downloadotp-a18853e6814ab42188e56343e6363ff94c794bb8.tar.gz
otp-a18853e6814ab42188e56343e6363ff94c794bb8.tar.bz2
otp-a18853e6814ab42188e56343e6363ff94c794bb8.zip
erts: Optimize struct ErlNifMapIterator
No need to use 64bit integers on 32bit machines.
-rw-r--r--erts/emulator/beam/erl_nif.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h
index ae7f63f923..7613446f64 100644
--- a/erts/emulator/beam/erl_nif.h
+++ b/erts/emulator/beam/erl_nif.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2009-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2009-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -103,6 +103,8 @@ typedef unsigned long long ERL_NIF_TERM;
# endif
#endif
+typedef ERL_NIF_TERM ERL_NIF_UINT;
+
struct enif_environment_t;
typedef struct enif_environment_t ErlNifEnv;
@@ -175,15 +177,14 @@ typedef enum
}ErlNifDirtyTaskFlags;
#endif
-typedef struct
+typedef struct /* All fields all internal and may change */
{
- /* use a lot of memory, structure may change */
ERL_NIF_TERM map;
- ErlNifUInt64 h_limit;
- ErlNifUInt64 t_limit;
- ErlNifUInt64 idx;
+ ERL_NIF_UINT t_limit;
+ ERL_NIF_UINT idx;
ERL_NIF_TERM *ks;
ERL_NIF_TERM *vs;
+ void* __spare__[2]; /* for future additions to be ABI compatible (same struct size) */
} ErlNifMapIterator;
typedef enum {