Changeset 42f6e07
- Timestamp:
- Dec 16, 2020, 11:57:02 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 2b4daf2
- Parents:
- ccb8c8a (diff), 54eb1bb3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/thierry_delisle_PhD/code/readQ_example/Makefile
rccb8c8a r42f6e07 1 all: gui-proto 1 all: gui-proto-pthread gui-proto-fibre gui-proto-cforall 2 3 PRECIOUS: thrdlib/libthrd-pthread.so thrdlib/libthrd-fibre.so thrdlib/libthrd-cforall.so 2 4 3 5 CXXFLAGS = -fpic -g -O0 -I. 4 6 5 gui-proto: proto-gui/main.o thrdlib/thread.o 6 $(CXX) -pthread -ldl -o ${@} ${^} -ftls-model=initial-exec 7 thrdlib/libthrd-%.so: 8 +${MAKE} -C thrdlib libthrd-$*.so 9 10 gui-proto-%: proto-gui/main.o thrdlib/libthrd-%.so Makefile 11 $(CXX) -Lthrdlib -Wl,--rpath,thrdlib -pthread -o $@ $< -lthrd-$* 12 13 CFAINC=${HOME}/local/include/cfa-dev 14 CFALIB=${HOME}/local/lib/cfa-dev/x64-debug 15 CFAFLAGS=-z execstack -ftls-model=initial-exec -L${CFALIB} -Wl,-rpath,${CFALIB} 16 17 gui-proto-cforall: proto-gui/main.o thrdlib/libthrd-cforall.so Makefile 18 $(CXX) -Lthrdlib -Wl,--rpath,thrdlib ${CFAFLAGS} -pthread -o $@ $< -lthrd-cforall -Wl,--push-state,--no-as-needed -lcfathread -lcfa -ldl -lm -Wl,--pop-state -
doc/theses/thierry_delisle_PhD/code/readQ_example/proto-gui/main.cpp
rccb8c8a r42f6e07 11 11 #include <getopt.h> 12 12 using thrdlib::thread_t; 13 14 15 extern __attribute__((aligned(128))) thread_local struct {16 void * volatile this_thread;17 void * volatile this_processor;18 void * volatile this_stats;19 20 struct {21 volatile unsigned short disable_count;22 volatile bool enabled;23 volatile bool in_progress;24 } preemption_state;25 26 #if defined(__SIZEOF_INT128__)27 __uint128_t rand_seed;28 #else29 uint64_t rand_seed;30 #endif31 struct {32 uint64_t fwd_seed;33 uint64_t bck_seed;34 } ready_rng;35 } kernelTLS __attribute__ ((tls_model ( "initial-exec" )));36 13 37 14 //-------------------- … … 148 125 } 149 126 127 typedef uint64_t __wyhash64_state_t; 128 static inline uint64_t __wyhash64( __wyhash64_state_t & state ) { 129 state += 0x60bee2bee120fc15; 130 __uint128_t tmp; 131 tmp = (__uint128_t) state * 0xa3b195354a39b70d; 132 uint64_t m1 = (tmp >> 64) ^ tmp; 133 tmp = (__uint128_t)m1 * 0x1b03738712fad5c9; 134 uint64_t m2 = (tmp >> 64) ^ tmp; 135 return m2; 136 } 137 150 138 void Simulator( thread_t self ) { 151 139 for(unsigned i = 0; i < nproduce; i++) { … … 156 144 } 157 145 146 __wyhash64_state_t state = 0; 147 158 148 // Write the frame information 159 149 frame.number = i; 160 150 for( unsigned x = 0; x < fsize; x++ ) { 161 frame.data[x] = i;151 frame.data[x] = __wyhash64(state); 162 152 } 163 153 std::cout << "Simulated " << i << std::endl; … … 187 177 188 178 std::cout << "Rendered " << i << std::endl; 189 assert(total == i * fsize);179 // assert(total == i * fsize); 190 180 191 181 // Release … … 201 191 int main(int argc, char * argv[]) { 202 192 nframes = 3; 203 fsize = 1000;193 fsize = 3840 * 2160 * 4 * 4; 204 194 nproduce = 60; 205 206 const char * framework;207 195 208 196 for(;;) { … … 222 210 // Exit Case 223 211 case -1: 224 /* paranoid */ assert(optind <= argc);225 if( optind == argc ) {226 std::cerr << "Must specify a framework" << std::endl;227 goto usage;228 229 }230 framework = argv[optind];231 212 goto run; 232 213 case 'b': … … 261 242 std::cerr << opt << std::endl; 262 243 usage: 263 std::cerr << "Usage: " << argv[0] << " [options] framework" << std::endl;244 std::cerr << "Usage: " << argv[0] << " [options]" << std::endl; 264 245 std::cerr << std::endl; 265 246 std::cerr << " -b, --buff=COUNT Number of frames to buffer" << std::endl; … … 270 251 } 271 252 run: 272 assert( framework );273 274 253 frames.reset(new Frame[nframes]); 275 254 for(unsigned i = 0; i < nframes; i++) { … … 280 259 std::cout << "(Buffering " << nframes << ")" << std::endl; 281 260 282 thrdlib::init( framework,2 );261 thrdlib::init( 2 ); 283 262 284 263 thread_t stats = thrdlib::create( Stats ); -
doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/Makefile
rccb8c8a r42f6e07 1 all: fibre.so pthread.so cforall.so1 all: fibre.so libthrd-pthread.so.so cforall.so 2 2 3 3 clean: 4 rm -rf fibre.so pthread.so4 rm -rf fibre.so libthrd-pthread.so.so cforall.so 5 5 6 6 CXXFLAGS=-Wall -Wextra -O3 -g -fpic -std=c++17 -pthread -ftls-model=initial-exec 7 7 8 pthread.so: pthread.cpp Makefile9 $(CXX) $(CXXFLAGS) -shared -o $ {@} ${<}8 libthrd-pthread.so: thread.cpp thread.hpp Makefile 9 $(CXX) $(CXXFLAGS) -shared -o $@ $< -DWITH_PTHREADS 10 10 11 fibre.so: fibre.cpp Makefile12 $(CXX) $(CXXFLAGS) -shared -o $ {@} ${<}-lfibre11 libthrd-fibre.so: thread.cpp thread.hpp Makefile 12 $(CXX) $(CXXFLAGS) -shared -o $@ $< -DWITH_LIBFIBRE -lfibre 13 13 14 14 CFAINC=${HOME}/local/include/cfa-dev … … 16 16 CFAFLAGS=-z execstack -I${CFAINC} -I${CFAINC}/concurrency -L${CFALIB} -Wl,-rpath,${CFALIB} 17 17 18 cforall.so: cforall.cpp Makefile19 $(CXX) $(CXXFLAGS) $(CFAFLAGS) -shared -o $ {@} ${<} -lcfathread -lcfa -ldl -lm18 libthrd-cforall.so: thread.cpp thread.hpp Makefile 19 $(CXX) $(CXXFLAGS) $(CFAFLAGS) -shared -o $@ $< -DWITH_CFORALL -Wl,--push-state,--no-as-needed -lcfathread -lcfa -ldl -lm -Wl,--pop-state -
doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/pthread.hpp
rccb8c8a r42f6e07 1 #pragma once 2 1 3 #include <pthread.h> 2 4 #include <errno.h> … … 97 99 // Basic kernel features 98 100 void thrdlib_init( int ) {} 101 void thrdlib_clean( void ) {} 99 102 } -
doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread.cpp
rccb8c8a r42f6e07 1 #include "thread.hpp" 1 #if !defined(WITH_PTHREADS) && !defined(WITH_LIBFIBRE) && !defined(WITH_CFORALL) 2 #error must define WITH_PTHREADS, WITH_LIBFIBRE or WITH_CFORALL 3 #endif 2 4 3 #i nclude <cstdarg> // va_start, va_end4 #include <cstdio>5 # include <cstring> // strlen6 extern "C" { 7 #include <unistd.h> // _exit, getpid 8 #include <signal.h> 9 #include <dlfcn.h> // dlopen, dlsym 10 #include <execinfo.h> // backtrace, messages 11 } 5 #ifdef WITH_PTHREADS 6 #include "pthread.hpp" 7 #endif 8 #ifdef WITH_LIBFIBRE 9 #include "fibre.hpp" 10 #endif 11 #ifdef WITH_CFORALL 12 #include "cforall.hpp" 13 #endif 12 14 13 #include <iostream> 14 #include <string> 15 namespace thrdlib { 16 //-------------------- 17 // Basic thread support 18 void * create( void (*main)( void * ) ) { return (thread_t)thrdlib_create( (void (*)( thread_t )) main ); } 19 void join ( void * handle ) { thrdlib_join ((thread_t)handle); } 20 void park ( void * handle ) { thrdlib_park ((thread_t)handle); } 21 void unpark( void * handle ) { thrdlib_unpark((thread_t)handle); } 22 void yield( void ) { thrdlib_yield(); } 15 23 16 using thrdlib::thread_t; 17 18 thread_t (*thrdlib::create)( void (*main)( thread_t ) ) = nullptr; 19 void (*thrdlib::join)( thread_t handle ) = nullptr; 20 void (*thrdlib::park)( thread_t handle ) = nullptr; 21 void (*thrdlib::unpark)( thread_t handle ) = nullptr; 22 void (*thrdlib::yield)( void ) = nullptr; 23 void (*lib_clean)(void) = nullptr; 24 25 typedef void (*fptr_t)(); 26 static fptr_t open_symbol( void * library, const char * symbol, bool required ) { 27 void * ptr = dlsym( library, symbol ); 28 29 const char * error = dlerror(); 30 if ( required && error ) { 31 std::cerr << "Fetching symbol '" << symbol << "' failed with error '" << error << "'\n"; 32 std::abort(); 33 } 34 35 return (fptr_t)ptr; 36 } 37 38 //-------------------- 39 // Basic kernel features 40 void thrdlib::init( const char * name, int procs ) { 41 std::string file = __FILE__; 42 std::size_t found = file.find_last_of("/"); 43 std::string libname = file.substr(0,found+1) + name + ".so"; 44 45 std::cout << "Use framework " << name << "(" << libname << ")\n"; 46 47 void * library = dlopen( libname.c_str(), RTLD_NOW ); 48 if ( const char * error = dlerror() ) { 49 std::cerr << "Could not open library '" << libname << "' from name '" << name <<"'\n"; 50 std::cerr << "Error was : '" << error << "'\n"; 51 std::abort(); 52 } 53 54 void (*lib_init)( int ) = (void (*)( int ))open_symbol( library, "thrdlib_init", false ); 55 lib_clean = open_symbol( library, "thrdlib_clean" , false ); 56 57 thrdlib::create = (typeof(thrdlib::create))open_symbol( library, "thrdlib_create", true ); 58 thrdlib::join = (typeof(thrdlib::join ))open_symbol( library, "thrdlib_join" , true ); 59 thrdlib::park = (typeof(thrdlib::park ))open_symbol( library, "thrdlib_park" , true ); 60 thrdlib::unpark = (typeof(thrdlib::unpark))open_symbol( library, "thrdlib_unpark", true ); 61 thrdlib::yield = (typeof(thrdlib::yield ))open_symbol( library, "thrdlib_yield" , true ); 62 63 lib_init( procs ); 64 } 65 66 void thrdlib::clean( void ) { 67 if(lib_clean) lib_clean(); 68 } 24 //-------------------- 25 // Basic kernel features 26 void init( int procs ) { thrdlib_init(procs); } 27 void clean( void ) { thrdlib_clean(); } 28 }; -
doc/theses/thierry_delisle_PhD/code/readQ_example/thrdlib/thread.hpp
rccb8c8a r42f6e07 6 6 //-------------------- 7 7 // Basic thread support 8 extern thread_t (*create)( void (*main)( thread_t ) );9 extern void (*join)( thread_t handle );10 extern void (*park)( thread_t handle );11 extern void (*unpark)( thread_t handle );12 extern void (*yield)( void ) ;8 extern thread_t create( void (*main)( thread_t ) ); 9 extern void join( thread_t handle ); 10 extern void park( thread_t handle ); 11 extern void unpark( thread_t handle ); 12 extern void yield( void ) ; 13 13 14 14 //-------------------- 15 15 // Basic kernel features 16 extern void init( const char * name,int procs );16 extern void init( int procs ); 17 17 extern void clean( void ); 18 18 }; -
libcfa/src/concurrency/coroutine.cfa
rccb8c8a r42f6e07 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Oct 23 23:05:24 202013 // Update Count : 2 212 // Last Modified On : Tue Dec 15 12:06:04 2020 13 // Update Count : 23 14 14 // 15 15 … … 88 88 static const size_t MinStackSize = 1000; 89 89 extern size_t __page_size; // architecture pagesize HACK, should go in proper runtime singleton 90 extern int __map_prot; 90 91 91 92 void __stack_prepare( __stack_info_t * this, size_t create_size ); … … 206 207 __cfaabi_dbg_debug_do( 207 208 storage = (char*)(storage) - __page_size; 208 if ( mprotect( storage, __page_size, PROT_READ | PROT_WRITE) == -1 ) {209 if ( mprotect( storage, __page_size, __map_prot ) == -1 ) { 209 210 abort( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) ); 210 211 } -
libcfa/src/concurrency/kernel/startup.cfa
rccb8c8a r42f6e07 117 117 } 118 118 119 size_t __page_size = 0;119 extern size_t __page_size; 120 120 121 121 //----------------------------------------------------------------------------- … … 161 161 /* paranoid */ verify( ! __preemption_enabled() ); 162 162 __cfadbg_print_safe(runtime_core, "Kernel : Starting\n"); 163 164 __page_size = sysconf( _SC_PAGESIZE );165 163 166 164 __cfa_dbg_global_clusters.list{ __get }; … … 681 679 #if CFA_PROCESSOR_USE_MMAP 682 680 stacksize = ceiling( stacksize, __page_size ) + __page_size; 683 stack = mmap(0p, stacksize, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0);681 stack = mmap(0p, stacksize, __map_prot, MAP_PRIVATE | MAP_ANONYMOUS, 0, 0); 684 682 if(stack == ((void*)-1)) { 685 683 abort( "pthread stack creation : internal error, mmap failure, error(%d) %s.", errno, strerror( errno ) ); -
libcfa/src/heap.cfa
rccb8c8a r42f6e07 10 10 // Created On : Tue Dec 19 21:58:35 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Dec 13 22:04:10202013 // Update Count : 98412 // Last Modified On : Tue Dec 15 21:37:54 2020 13 // Update Count : 1013 14 14 // 15 15 16 16 #include <unistd.h> // sbrk, sysconf 17 #include <stdlib.h> // EXIT_FAILURE 17 18 #include <stdbool.h> // true, false 18 19 #include <stdio.h> // snprintf, fileno … … 71 72 // Define the default extension heap amount in units of bytes. When the uC++ supplied heap reaches the brk address, 72 73 // the brk address is extended by the extension amount. 73 __CFA_DEFAULT_HEAP_EXPANSION__ = (1 * 1024 * 1024),74 __CFA_DEFAULT_HEAP_EXPANSION__ = (10 * 1024 * 1024), 74 75 75 76 // Define the mmap crossover point during allocation. Allocations less than this amount are allocated from buckets; … … 115 116 116 117 // statically allocated variables => zero filled. 117 static size_t pageSize; // architecture pagesize 118 size_t __page_size; // architecture pagesize 119 int __map_prot; // common mmap/mprotect protection 118 120 static size_t heapExpand; // sbrk advance 119 121 static size_t mmapStart; // cross over point for mmap … … 249 251 #endif // FASTLOOKUP 250 252 251 static int mmapFd = -1;// fake or actual fd for anonymous file253 static const off_t mmapFd = -1; // fake or actual fd for anonymous file 252 254 #ifdef __CFA_DEBUG__ 253 255 static bool heapBoot = 0; // detect recursion during boot … … 374 376 375 377 static inline bool setMmapStart( size_t value ) { // true => mmapped, false => sbrk 376 if ( value < pageSize || bucketSizes[NoBucketSizes - 1] < value ) return false;378 if ( value < __page_size || bucketSizes[NoBucketSizes - 1] < value ) return false; 377 379 mmapStart = value; // set global 378 380 … … 484 486 #define NO_MEMORY_MSG "insufficient heap memory available for allocating %zd new bytes." 485 487 488 #include <unistd.h> 486 489 static inline void * extend( size_t size ) with( heapManager ) { 487 490 lock( extlock __cfaabi_dbg_ctx2 ); … … 490 493 // If the size requested is bigger than the current remaining storage, increase the size of the heap. 491 494 492 size_t increase = ceiling2( size > heapExpand ? size : heapExpand, pageSize ); 495 size_t increase = ceiling2( size > heapExpand ? size : heapExpand, __page_size ); 496 // Do not call abort or strerror( errno ) as they may call malloc. 493 497 if ( sbrk( increase ) == (void *)-1 ) { // failed, no memory ? 494 498 unlock( extlock ); 495 abort( NO_MEMORY_MSG, size ); // give up 496 } // if 497 if ( mprotect( (char *)heapEnd + heapRemaining, increase, PROT_READ | PROT_WRITE | PROT_EXEC ) ) { 498 enum { BufferSize = 128 }; 499 char helpText[BufferSize]; 500 // Do not call strerror( errno ) as it may call malloc. 501 int len = snprintf( helpText, BufferSize, "internal error, extend(), mprotect failure, heapEnd:%p size:%zd, errno:%d.", heapEnd, increase, errno ); 502 __cfaabi_bits_write( STDERR_FILENO, helpText, len ); 499 __cfaabi_bits_print_nolock( STDERR_FILENO, NO_MEMORY_MSG, size ); 500 _exit( EXIT_FAILURE ); 501 } // if 502 if ( mprotect( (char *)heapEnd + heapRemaining, increase, __map_prot ) ) { 503 unlock( extlock ); 504 __cfaabi_bits_print_nolock( STDERR_FILENO, "extend() : internal error, mprotect failure, heapEnd:%p size:%zd, errno:%d.\n", heapEnd, increase, errno ); 505 _exit( EXIT_FAILURE ); 503 506 } // if 504 507 #ifdef __STATISTICS__ … … 508 511 #ifdef __CFA_DEBUG__ 509 512 // Set new memory to garbage so subsequent uninitialized usages might fail. 510 //memset( (char *)heapEnd + heapRemaining, '\377', increase );511 Memset( (char *)heapEnd + heapRemaining, increase );513 memset( (char *)heapEnd + heapRemaining, '\hde', increase ); 514 //Memset( (char *)heapEnd + heapRemaining, increase ); 512 515 #endif // __CFA_DEBUG__ 513 516 rem = heapRemaining + increase - size; … … 568 571 block->header.kind.real.home = freeElem; // pointer back to free list of apropriate size 569 572 } else { // large size => mmap 570 if ( unlikely( size > ULONG_MAX - pageSize ) ) return 0p;571 tsize = ceiling2( tsize, pageSize ); // must be multiple of page size573 if ( unlikely( size > ULONG_MAX - __page_size ) ) return 0p; 574 tsize = ceiling2( tsize, __page_size ); // must be multiple of page size 572 575 #ifdef __STATISTICS__ 573 576 __atomic_add_fetch( &mmap_calls, 1, __ATOMIC_SEQ_CST ); … … 575 578 #endif // __STATISTICS__ 576 579 577 block = (HeapManager.Storage *)mmap( 0, tsize, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, mmapFd, 0 );580 block = (HeapManager.Storage *)mmap( 0, tsize, __map_prot, MAP_PRIVATE | MAP_ANONYMOUS, mmapFd, 0 ); 578 581 if ( block == (HeapManager.Storage *)MAP_FAILED ) { // failed ? 579 582 if ( errno == ENOMEM ) abort( NO_MEMORY_MSG, tsize ); // no memory … … 583 586 #ifdef __CFA_DEBUG__ 584 587 // Set new memory to garbage so subsequent uninitialized usages might fail. 585 //memset( block, '\377', tsize );586 Memset( block, tsize );588 memset( block, '\hde', tsize ); 589 //Memset( block, tsize ); 587 590 #endif // __CFA_DEBUG__ 588 591 block->header.kind.real.blockSize = tsize; // storage size for munmap … … 624 627 #endif // __STATISTICS__ 625 628 if ( munmap( header, size ) == -1 ) { 626 #ifdef __CFA_DEBUG__627 629 abort( "Attempt to deallocate storage %p not allocated or with corrupt header.\n" 628 630 "Possible cause is invalid pointer.", 629 631 addr ); 630 #endif // __CFA_DEBUG__631 632 } // if 632 633 } else { 633 634 #ifdef __CFA_DEBUG__ 634 635 // Set free memory to garbage so subsequent usages might fail. 635 //memset( ((HeapManager.Storage *)header)->data, '\377', freeElem->blockSize - sizeof( HeapManager.Storage ) );636 Memset( ((HeapManager.Storage *)header)->data, freeElem->blockSize - sizeof( HeapManager.Storage ) );636 memset( ((HeapManager.Storage *)header)->data, '\hde', freeElem->blockSize - sizeof( HeapManager.Storage ) ); 637 //Memset( ((HeapManager.Storage *)header)->data, freeElem->blockSize - sizeof( HeapManager.Storage ) ); 637 638 #endif // __CFA_DEBUG__ 638 639 … … 703 704 704 705 static void ?{}( HeapManager & manager ) with( manager ) { 705 pageSize = sysconf( _SC_PAGESIZE ); 706 __page_size = sysconf( _SC_PAGESIZE ); 707 __map_prot = PROT_READ | PROT_WRITE | PROT_EXEC; 706 708 707 709 for ( unsigned int i = 0; i < NoBucketSizes; i += 1 ) { // initialize the free lists … … 723 725 724 726 char * end = (char *)sbrk( 0 ); 725 heapBegin = heapEnd = sbrk( (char *)ceiling2( (long unsigned int)end, pageSize ) - end ); // move start of heap to multiple of alignment727 heapBegin = heapEnd = sbrk( (char *)ceiling2( (long unsigned int)end, __page_size ) - end ); // move start of heap to multiple of alignment 726 728 } // HeapManager 727 729 … … 741 743 #ifdef __CFA_DEBUG__ 742 744 if ( heapBoot ) { // check for recursion during system boot 743 // DO NOT USE STREAMS AS THEY MAY BE UNAVAILABLE AT THIS POINT.744 745 abort( "boot() : internal error, recursively invoked during system boot." ); 745 746 } // if … … 1048 1049 // page size. It is equivalent to memalign(sysconf(_SC_PAGESIZE),size). 1049 1050 void * valloc( size_t size ) { 1050 return memalign( pageSize, size );1051 return memalign( __page_size, size ); 1051 1052 } // valloc 1052 1053 … … 1054 1055 // Same as valloc but rounds size to multiple of page size. 1055 1056 void * pvalloc( size_t size ) { 1056 return memalign( pageSize, ceiling2( size, pageSize ) );1057 return memalign( __page_size, ceiling2( size, __page_size ) ); 1057 1058 } // pvalloc 1058 1059 … … 1193 1194 choose( option ) { 1194 1195 case M_TOP_PAD: 1195 heapExpand = ceiling2( value, pageSize ); return 1;1196 heapExpand = ceiling2( value, __page_size ); return 1; 1196 1197 case M_MMAP_THRESHOLD: 1197 1198 if ( setMmapStart( value ) ) return 1; -
tests/heap.cfa
rccb8c8a r42f6e07 10 10 // Created On : Tue Nov 6 17:54:56 2018 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Sep 25 15:21:52202013 // Update Count : 7 312 // Last Modified On : Tue Dec 15 12:11:51 2020 13 // Update Count : 79 14 14 // 15 15 … … 27 27 // } 28 28 29 #define __U_DEFAULT_MMAP_START__ (512 * 1024 + 1) 30 size_t default_mmap_start() __attribute__(( weak )) { 31 return __U_DEFAULT_MMAP_START__; 29 size_t default_heap_expansion() { 30 return 10 * 1024 * 1024; 31 } // default_heap_expansion 32 33 size_t default_mmap_start() { 34 return 512 * 1024 + 1; 32 35 } // default_mmap_start 33 36
Note: See TracChangeset
for help on using the changeset viewer.