aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/c_src/erl_memory.c
AgeCommit message (Collapse)Author
2016-03-15update copyright-yearHenrik Nord
2015-06-18Change license text to APLv2Bruce Yinhe
2013-12-02Silence warnings about socklen_t pointers sign in erl_memoryAnthony Ramine
erl_memory.c:947:7: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] &saddr_size) != 0) ^~~~~~~~~~~ /usr/include/sys/socket.h:616:74: note: passing argument to parameter here int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ erl_memory.c:2613:57: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] sock = accept(lsock, (struct sockaddr *) &oth_addr, &oth_addr_len); ^~~~~~~~~~~~~ /usr/include/sys/socket.h:610:69: note: passing argument to parameter here int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) ^
2013-12-02Silence warnings about different buffer types in erl_memoryAnthony Ramine
erl_memory.c:861:19: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->size); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:863:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:869:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->no); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:871:20: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:878:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:900:19: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->max_ever_size); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:902:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*s %*s ", fw, "", fw, ""); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:904:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*" USGND_INT_MAX_FSTR " ", fw, mi->max_ever_no); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:906:20: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*s %*s ", fw, "", fw, ""); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:909:16: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] *p += sprintf(*p, "%*s %*s %*s ", fw, "", fw, "", fw, ""); ^~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:986:25: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] area.size = sprintf(area.ptr, format, carg); ^~~~~~~~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1103:25: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] area.size = sprintf(area.ptr, ^~~~~~~~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1109:23: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] area.size += sprintf(area.ptr + area.size, ^~~~~~~~~~~~~~~~~~~~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1120:26: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] area.size += sprintf(area.ptr + area.size, ^~~~~~~~~~~~~~~~~~~~ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1190:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "> %-*s", EM_TIME_FIELD_WIDTH - 2, "Maximum:"); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1223:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "\n"); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1227:15: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "%s", stop_str); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1230:15: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, exit_str, state->info.exit_status); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1236:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, format, tsz, bw); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1286:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "%*" USGND_INT_32_FSTR " ", EM_TIME_FIELD_WIDTH - 1, secs); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:1311:18: warning: passing 'usgnd_int_8 *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] p += sprintf(p, "\n"); ^ /usr/include/secure/_stdio.h:49:28: note: expanded from macro 'sprintf' __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) ^ erl_memory.c:2231:32: warning: passing 'char *' to parameter of type 'usgnd_int_8 *' (aka 'unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] size = write_header(state, state->output.header, 1); ^~~~~~~~~~~~~~~~~~~~ erl_memory.c:736:44: note: passing argument to parameter 'ptr' here write_header(em_state *state, usgnd_int_8 *ptr, int trunc) ^
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-01-03tools: Use literal formatting in erl_memory.cBjörn-Egil Dahlberg
* Removes -Wformat-security problems
2010-08-10Rewrite ethread libraryRickard Green
Large parts of the ethread library have been rewritten. The ethread library is an Erlang runtime system internal, portable thread library used by the runtime system itself. Most notable improvement is a reader optimized rwlock implementation which dramatically improve the performance of read-lock/read-unlock operations on multi processor systems by avoiding ping-ponging of the rwlock cache lines. The reader optimized rwlock implementation is used by miscellaneous rwlocks in the runtime system that are known to be read-locked frequently, and can be enabled on ETS tables by passing the `{read_concurrency, true}' option upon table creation. See the documentation of `ets:new/2' for more information. The ethread library can now also use the libatomic_ops library for atomic memory accesses. This makes it possible for the Erlang runtime system to utilize optimized atomic operations on more platforms than before. Use the `--with-libatomic_ops=PATH' configure command line argument when specifying where the libatomic_ops installation is located. The libatomic_ops library can be downloaded from: http://www.hpl.hp.com/research/linux/atomic_ops/ The changed API of the ethread library has also caused modifications in the Erlang runtime system. Preparations for the to come "delayed deallocation" feature has also been done since it depends on the ethread library. Note: When building for x86, the ethread library will now use instructions that first appeared on the pentium 4 processor. If you want the runtime system to be compatible with older processors (back to 486) you need to pass the `--enable-ethread-pre-pentium4-compatibility' configure command line argument when configuring the system.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP