Changeset d83977 in git
- Timestamp:
- Jan 27, 2001, 6:03:41 PM (23 years ago)
- Branches:
- (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
- Children:
- f8dcbcb76eacf689bc3c66b8de4226eeba5f741d
- Parents:
- 4e69082e0209f82df529824514e15aea87df0b8e
- Location:
- omalloc
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
omalloc/Makefile.in
r4e6908 rd83977 4 4 ### Author: obachman@mathematik.uni-kl.de (Olaf Bachmann) 5 5 ### Created: 11/99 6 ### Version: $Id: Makefile.in,v 1. 7 2000-12-14 17:24:30obachman Exp $6 ### Version: $Id: Makefile.in,v 1.8 2001-01-27 17:03:38 obachman Exp $ 7 7 ################################################################# 8 8 … … 64 64 omAllocSystem.c omError.c omStats.c omRet2Info.c \ 65 65 omBin.c omFindExec.c omDebugTrack.c \ 66 omalloc_provide.c 66 omalloc_provide.c omAllocFunc.c 67 67 68 68 ifdef EXTERNAL_CONFIG_SOURCE … … 84 84 omBin.h omDefaultConfig.h omStructs.h \ 85 85 omBinPage.h omInline.h omGetBackTrace.h \ 86 omReturn.h omRet2Info.h 86 omReturn.h omRet2Info.h omAllocFunc.h 87 87 88 88 OBJS := $(CSOURCES:.c=.o) $(GSOURCES:.c=.o) -
omalloc/configure
r4e6908 rd83977 1948 1948 if test "${with_malloc}" = system; then 1949 1949 OM_MALLOC_HEADER=omMallocSystem.h 1950 cat >> confdefs.h <<\EOF 1951 #define OMALLOC_USES_MALLOC 1 1952 EOF 1953 1950 1954 if test "${with_provide_malloc}" = yes || test "${with_provide_malloc}" = debug; then 1951 1955 { echo "configure: error: "can not provide malloc for --with-malloc=system"" 1>&2; exit 1; } … … 1966 1970 OM_MALLOC_HEADER=$with_external_malloc_h 1967 1971 OM_MALLOC_SOURCE=$with_external_malloc_c 1972 cat >> confdefs.h <<\EOF 1973 #define OMALLOC_USES_MALLOC 1 1974 EOF 1975 1968 1976 else 1969 1977 with_malloc=dlmalloc … … 1982 1990 1983 1991 echo $ac_n "checking whether malloc provides SizeOfAddr""... $ac_c" 1>&6 1984 echo "configure:19 85: checking whether malloc provides SizeOfAddr" >&51992 echo "configure:1993: checking whether malloc provides SizeOfAddr" >&5 1985 1993 if test "${ac_cv_malloc_sizeof_addr}" = no; then 1986 1994 echo "$ac_t""(cached) no" 1>&6 … … 1992 2000 else 1993 2001 cat > conftest.$ac_ext <<EOF 1994 #line 1995"configure"2002 #line 2003 "configure" 1995 2003 #include "confdefs.h" 1996 2004 … … 2009 2017 2010 2018 EOF 2011 if { (eval echo configure:20 12: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null2019 if { (eval echo configure:2020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2012 2020 then 2013 2021 ac_cv_malloc_sizeof_addr="${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}" … … 2057 2065 2058 2066 echo $ac_n "checking whether working valloc exists""... $ac_c" 1>&6 2059 echo "configure:206 0: checking whether working valloc exists" >&52067 echo "configure:2068: checking whether working valloc exists" >&5 2060 2068 if test "${ac_cv_working_valloc}" = no; then 2061 2069 echo "$ac_t""(cached) no" 1>&6 … … 2067 2075 else 2068 2076 cat > conftest.$ac_ext <<EOF 2069 #line 207 0"configure"2077 #line 2078 "configure" 2070 2078 #include "confdefs.h" 2071 2079 … … 2085 2093 2086 2094 EOF 2087 if { (eval echo configure:20 88: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null2095 if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2088 2096 then 2089 2097 ac_cv_working_valloc="${OM_MALLOC_HEADER}_${OM_MALLOC_SOURCE}" … … 2105 2113 2106 2114 echo $ac_n "checking which valloc to use""... $ac_c" 1>&6 2107 echo "configure:21 08: checking which valloc to use" >&52115 echo "configure:2116: checking which valloc to use" >&5 2108 2116 if test "${with_valloc+set}" != set || test "${with_valloc}" = mmap; then 2109 2117 if test "${ac_cv_working_mmap}" = yes; then … … 2118 2126 fi 2119 2127 if test "${with_valloc}" = malloc; then 2120 if test " {ac_cv_working_valloc}" != no; then2128 if test "${ac_cv_working_valloc}" != no; then 2121 2129 cat >> confdefs.h <<\EOF 2122 2130 #define OM_HAVE_VALLOC_MALLOC 1 … … 2130 2138 2131 2139 echo $ac_n "checking whether to emulate omalloc""... $ac_c" 1>&6 2132 echo "configure:21 33: checking whether to emulate omalloc" >&52140 echo "configure:2141: checking whether to emulate omalloc" >&5 2133 2141 if test "${with_emulate_omalloc}" = yes; then 2134 2142 cat >> confdefs.h <<\EOF … … 2142 2150 2143 2151 echo $ac_n "checking how to align""... $ac_c" 1>&6 2144 echo "configure:21 45: checking how to align" >&52152 echo "configure:2153: checking how to align" >&5 2145 2153 if test "$with_align" = 8 || test "$ac_cv_sizeof_long" = 8; then 2146 2154 ac_cv_align=8 … … 2163 2171 2164 2172 echo $ac_n "checking whether to use dense bins""... $ac_c" 1>&6 2165 echo "configure:21 66: checking whether to use dense bins" >&52173 echo "configure:2174: checking whether to use dense bins" >&5 2166 2174 if test "$with_dense_bins" = yes; then 2167 2175 echo "$ac_t""yes" 1>&6 … … 2175 2183 2176 2184 echo $ac_n "checking whether to disable debugging""... $ac_c" 1>&6 2177 echo "configure:21 78: checking whether to disable debugging" >&52185 echo "configure:2186: checking whether to disable debugging" >&5 2178 2186 if test "$with_debug" != no; then 2179 2187 echo "$ac_t""no" 1>&6 … … 2188 2196 2189 2197 echo $ac_n "checking whether to have tracking debug functionality""... $ac_c" 1>&6 2190 echo "configure:219 1: checking whether to have tracking debug functionality" >&52198 echo "configure:2199: checking whether to have tracking debug functionality" >&5 2191 2199 if test "$with_track" != no; then 2192 2200 echo "$ac_t""yes" 1>&6 … … 2200 2208 2201 2209 echo $ac_n "checking whether to use internal debug""... $ac_c" 1>&6 2202 echo "configure:22 03: checking whether to use internal debug" >&52210 echo "configure:2211: checking whether to use internal debug" >&5 2203 2211 if test "$with_internal_debug" = yes; then 2204 2212 echo "$ac_t""yes" 1>&6 … … 2213 2221 2214 2222 echo $ac_n "checking whether to inline""... $ac_c" 1>&6 2215 echo "configure:22 16: checking whether to inline" >&52223 echo "configure:2224: checking whether to inline" >&5 2216 2224 if test "$ac_cv_c_inline" != no && test "$with_inline" != no; then 2217 2225 cat >> confdefs.h <<EOF … … 2249 2257 2250 2258 echo $ac_n "checking whether GET_RET_ADDR works""... $ac_c" 1>&6 2251 echo "configure:22 52: checking whether GET_RET_ADDR works" >&52259 echo "configure:2260: checking whether GET_RET_ADDR works" >&5 2252 2260 if eval "test \"`echo '$''{'ac_cv_get_return_addr_works'+set}'`\" = set"; then 2253 2261 echo $ac_n "(cached) $ac_c" 1>&6 … … 2257 2265 else 2258 2266 cat > conftest.$ac_ext <<EOF 2259 #line 226 0"configure"2267 #line 2268 "configure" 2260 2268 #include "confdefs.h" 2261 2269 … … 2273 2281 2274 2282 EOF 2275 if { (eval echo configure:22 76: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null2283 if { (eval echo configure:2284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2276 2284 then 2277 2285 ac_cv_get_return_addr_works=yes … … 2296 2304 2297 2305 echo $ac_n "checking whether omGetBackTrace works""... $ac_c" 1>&6 2298 echo "configure:2 299: checking whether omGetBackTrace works" >&52306 echo "configure:2307: checking whether omGetBackTrace works" >&5 2299 2307 if eval "test \"`echo '$''{'ac_cv_get_backtrace_works'+set}'`\" = set"; then 2300 2308 echo $ac_n "(cached) $ac_c" 1>&6 … … 2304 2312 else 2305 2313 cat > conftest.$ac_ext <<EOF 2306 #line 23 07"configure"2314 #line 2315 "configure" 2307 2315 #include "confdefs.h" 2308 2316 … … 2325 2333 2326 2334 EOF 2327 if { (eval echo configure:23 28: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null2335 if { (eval echo configure:2336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2328 2336 then 2329 2337 ac_cv_get_backtrace_works=yes … … 2348 2356 2349 2357 echo $ac_n "checking whether addr2line works""... $ac_c" 1>&6 2350 echo "configure:235 1: checking whether addr2line works" >&52358 echo "configure:2359: checking whether addr2line works" >&5 2351 2359 if eval "test \"`echo '$''{'ac_cv_prog_addr2line_works'+set}'`\" = set"; then 2352 2360 echo $ac_n "(cached) $ac_c" 1>&6 … … 2356 2364 else 2357 2365 cat > conftest.$ac_ext <<EOF 2358 #line 23 59"configure"2366 #line 2367 "configure" 2359 2367 #include "confdefs.h" 2360 2368 … … 2389 2397 2390 2398 EOF 2391 if { (eval echo configure:2 392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null2399 if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2392 2400 then 2393 2401 ac_cv_prog_addr2line_works=yes … … 2406 2414 2407 2415 echo $ac_n "checking whether to track return addresses""... $ac_c" 1>&6 2408 echo "configure:24 09: checking whether to track return addresses" >&52416 echo "configure:2417: checking whether to track return addresses" >&5 2409 2417 if test "$with_track_return" = no || test "$ac_cv_get_return_addr_works" = no || test "$ac_cv_prog_addr2line_works" != yes; then 2410 2418 with_track_return=no … … 2419 2427 2420 2428 echo $ac_n "checking whether to track files and line numbers""... $ac_c" 1>&6 2421 echo "configure:24 22: checking whether to track files and line numbers" >&52429 echo "configure:2430: checking whether to track files and line numbers" >&5 2422 2430 if test "$with_track_fl" = no && test "$with_track_return" = no; then 2423 2431 with_track_fl=yes … … 2439 2447 2440 2448 echo $ac_n "checking whether to track stack backtraces""... $ac_c" 1>&6 2441 echo "configure:24 42: checking whether to track stack backtraces" >&52449 echo "configure:2450: checking whether to track stack backtraces" >&5 2442 2450 if test "$with_track" != no && test "$ac_cv_get_backtrace_works" = yes && test "$with_track_backtrace" != no && test "$ac_cv_prog_addr2line_works" = yes; then 2443 2451 with_track_backtrace=yes … … 2452 2460 2453 2461 echo $ac_n "checking whether to track custom values""... $ac_c" 1>&6 2454 echo "configure:24 55: checking whether to track custom values" >&52462 echo "configure:2463: checking whether to track custom values" >&5 2455 2463 if test "$with_track" != no && test "$with_track_custom" = yes; then 2456 2464 cat >> confdefs.h <<\EOF -
omalloc/configure.in
r4e6908 rd83977 4 4 dnl Author: obachman@mathematik.uni-kl.de (Olaf Bachmann) 5 5 dnl Created: 11/99 6 dnl Version: $Id: configure.in,v 1.1 1 2000-12-21 14:26:06obachman Exp $6 dnl Version: $Id: configure.in,v 1.12 2001-01-27 17:03:39 obachman Exp $ 7 7 dnl lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll 8 8 … … 239 239 if test "${with_malloc}" = system; then 240 240 OM_MALLOC_HEADER=omMallocSystem.h 241 AC_DEFINE(OMALLOC_USES_MALLOC) 241 242 if test "${with_provide_malloc}" = yes || test "${with_provide_malloc}" = debug; then 242 243 AC_MSG_ERROR("can not provide malloc for --with-malloc=system") … … 257 258 OM_MALLOC_HEADER=$with_external_malloc_h 258 259 OM_MALLOC_SOURCE=$with_external_malloc_c 260 AC_DEFINE(OMALLOC_USES_MALLOC) 259 261 else 260 262 with_malloc=dlmalloc … … 353 355 fi 354 356 if test "${with_valloc}" = malloc; then 355 if test " {ac_cv_working_valloc}" != no; then357 if test "${ac_cv_working_valloc}" != no; then 356 358 AC_DEFINE(OM_HAVE_VALLOC_MALLOC) 357 359 else -
omalloc/omConfig.h.in
r4e6908 rd83977 5 5 * Author: obachman (Olaf Bachmann) 6 6 * Created: 11/99 7 * Version: $Id: omConfig.h.in,v 1. 6 2000-09-12 16:02:18obachman Exp $7 * Version: $Id: omConfig.h.in,v 1.7 2001-01-27 17:03:40 obachman Exp $ 8 8 *******************************************************************/ 9 9 #ifndef OM_CONFIG_H … … 177 177 #endif 178 178 #endif /* OM_CONFIG_H */ 179 /* define if omalloc depends on "external" malloc functions like 180 those provided by the system -- if this id defined, an application 181 linking with omalloc needs to assure that a library containing malloc 182 is linked, as well */ 183 #ifndef OMALLOC_USES_MALLOC 184 #define OMALLOC_USES_MALLOC 185 #endif -
omalloc/omFindExec.c
r4e6908 rd83977 4 4 * Author: obachman (Olaf Bachmann) 5 5 * Created: 11/99 6 * Version: $Id: omFindExec.c,v 1. 7 2000-12-12 16:25:43 levandovExp $6 * Version: $Id: omFindExec.c,v 1.8 2001-01-27 17:03:40 obachman Exp $ 7 7 *******************************************************************/ 8 8 … … 219 219 } 220 220 221 222 char * omFindExec (const char *name, char* exec) 221 #ifdef WINNT 222 char * _omFindExec (const char *name, char* exec); 223 /* for windows, serch first for .exe */ 224 char* omFindExec(const char *name, char* exec) 225 { 226 227 if (strstr(name, ".exe") == NULL) 228 { 229 char buf[MAXPATHLEN]; 230 char* ret; 231 strcpy(buf, name); 232 strcat(buf, ".exe"); 233 ret = _omFindExec(buf, exec); 234 if (ret != NULL) return ret; 235 } 236 return _omFindExec(name, exec); 237 } 238 #else 239 #define _omFindExec omFindExec 240 #endif 241 242 char * _omFindExec (const char *name, char* exec) 223 243 { 224 244 char * link = omFindExec_link(name, exec); -
omalloc/omMmap.c
r4e6908 rd83977 4 4 * Author: obachman (Olaf Bachmann) 5 5 * Created: 11/99 6 * Version: $Id: omMmap.c,v 1. 4 2001-01-24 16:44:10 levandovExp $6 * Version: $Id: omMmap.c,v 1.5 2001-01-27 17:03:40 obachman Exp $ 7 7 *******************************************************************/ 8 8 #include <unistd.h> … … 21 21 #endif 22 22 23 #ifdef ix86_Win 23 #ifdef MAP_ANONYMOUS 24 #ifndef __CYGWIN__ 25 /* under cygwin, MAP_PRIVATE|MAP_ANONYMOUS fails */ 26 addr = mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); 27 #else 28 /* however, the following works */ 24 29 addr = mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE, -1, 0); 25 #elif defined(MAP_ANONYMOUS) 26 addr = mmap(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); 30 #endif 27 31 #else /* !MAP_ANONYMOUS */ 28 32 if (fd < 0) -
omalloc/omRet2Info.c
r4e6908 rd83977 4 4 * Author: obachman (Olaf Bachmann) 5 5 * Created: 11/99 6 * Version: $Id: omRet2Info.c,v 1.1 2 2000-12-14 17:24:31 obachman Exp $6 * Version: $Id: omRet2Info.c,v 1.13 2001-01-27 17:03:41 obachman Exp $ 7 7 *******************************************************************/ 8 8 #include <stdio.h> … … 76 76 i++; 77 77 } 78 fflush( stdin);78 fflush(NULL); 79 79 pipe = popen(command, "r"); 80 80 if (pipe != NULL) -
omalloc/om_Alloc.h
r4e6908 rd83977 4 4 * Author: obachman@mathematik.uni-kl.de (Olaf Bachmann) 5 5 * Created: 11/99 6 * Version: $Id: om_Alloc.h,v 1. 1 2000-12-12 15:26:18obachman Exp $6 * Version: $Id: om_Alloc.h,v 1.2 2001-01-27 17:03:41 obachman Exp $ 7 7 *******************************************************************/ 8 8 #ifndef OM_ALLOC_H … … 36 36 #include "omDebug.h" 37 37 #include "omInline.h" 38 #include "omAllocFunc.h" 38 39 39 40 #ifdef __cplusplus -
omalloc/omalloc.c
r4e6908 rd83977 5 5 * Author: obachman@mathematik.uni-kl.de (Olaf Bachmann) 6 6 * Created: 11/99 7 * Version: $Id: omalloc.c,v 1. 5 2000-12-21 16:23:59obachman Exp $7 * Version: $Id: omalloc.c,v 1.6 2001-01-27 17:03:41 obachman Exp $ 8 8 *******************************************************************/ 9 9 … … 83 83 } 84 84 85 /* on some systems strdup is a macro -- replace it */ 85 /* on some systems strdup is a macro -- replace it unless OMALLOC_FUNC 86 is defined */ 87 #if !defined(OMALOC_FUNC) 86 88 #undef strdup 89 #endif 87 90 char* strdup(const char* addr) 88 91 { … … 96 99 return NULL; 97 100 } 98 99 101 void freeSize(void* addr, size_t size) 100 102 { … … 117 119 } 118 120 } 121 119 122 #endif -
omalloc/omalloc_provide.c
r4e6908 rd83977 1 1 /******************************************************************* 2 2 * File: omalloc_provide.c 3 * Purpose: implementation of ANSI-C conforming which are to be provided4 * by omalloc library3 * Purpose: implementation of ANSI-C conforming malloc functions 4 * which are to be provided by omalloc library 5 5 * Author: obachman@mathematik.uni-kl.de (Olaf Bachmann) 6 6 * Created: 11/99 7 * Version: $Id: omalloc_provide.c,v 1. 3 2000-08-14 12:26:51 obachman Exp $7 * Version: $Id: omalloc_provide.c,v 1.4 2001-01-27 17:03:41 obachman Exp $ 8 8 *******************************************************************/ 9 9 #include "omConfig.h"
Note: See TracChangeset
for help on using the changeset viewer.