Changes in / [ccb8c8a:42f6e07]


Ignore:
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/thierry_delisle_PhD/code/readQ_example/Makefile

    rccb8c8a r42f6e07  
    1 all: gui-proto
     1all: gui-proto-pthread gui-proto-fibre gui-proto-cforall
     2
     3PRECIOUS: thrdlib/libthrd-pthread.so thrdlib/libthrd-fibre.so thrdlib/libthrd-cforall.so
    24
    35CXXFLAGS = -fpic -g -O0 -I.
    46
    5 gui-proto: proto-gui/main.o thrdlib/thread.o
    6         $(CXX) -pthread -ldl -o ${@} ${^} -ftls-model=initial-exec
     7thrdlib/libthrd-%.so:
     8        +${MAKE} -C thrdlib libthrd-$*.so
     9
     10gui-proto-%: proto-gui/main.o thrdlib/libthrd-%.so Makefile
     11        $(CXX) -Lthrdlib -Wl,--rpath,thrdlib -pthread -o $@ $< -lthrd-$*
     12
     13CFAINC=${HOME}/local/include/cfa-dev
     14CFALIB=${HOME}/local/lib/cfa-dev/x64-debug
     15CFAFLAGS=-z execstack -ftls-model=initial-exec -L${CFALIB} -Wl,-rpath,${CFALIB}
     16
     17gui-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  
    1111#include <getopt.h>
    1212using 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         #else
    29                 uint64_t rand_seed;
    30         #endif
    31         struct {
    32                 uint64_t fwd_seed;
    33                 uint64_t bck_seed;
    34         } ready_rng;
    35 } kernelTLS __attribute__ ((tls_model ( "initial-exec" )));
    3613
    3714//--------------------
     
    148125}
    149126
     127typedef uint64_t __wyhash64_state_t;
     128static 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
    150138void Simulator( thread_t self ) {
    151139        for(unsigned i = 0; i < nproduce; i++) {
     
    156144                }
    157145
     146                __wyhash64_state_t state = 0;
     147
    158148                // Write the frame information
    159149                frame.number = i;
    160150                for( unsigned x = 0; x < fsize; x++ ) {
    161                         frame.data[x] = i;
     151                        frame.data[x] = __wyhash64(state);
    162152                }
    163153                std::cout << "Simulated " << i << std::endl;
     
    187177
    188178                std::cout << "Rendered " << i << std::endl;
    189                 assert(total == i * fsize);
     179                // assert(total == i * fsize);
    190180
    191181                // Release
     
    201191int main(int argc, char * argv[]) {
    202192        nframes  = 3;
    203         fsize    = 1000;
     193        fsize    = 3840 * 2160 * 4 * 4;
    204194        nproduce = 60;
    205 
    206         const char * framework;
    207195
    208196        for(;;) {
     
    222210                        // Exit Case
    223211                        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];
    231212                                goto run;
    232213                        case 'b':
     
    261242                                std::cerr << opt << std::endl;
    262243                        usage:
    263                                 std::cerr << "Usage: " << argv[0] << " [options] framework" << std::endl;
     244                                std::cerr << "Usage: " << argv[0] << " [options]" << std::endl;
    264245                                std::cerr << std::endl;
    265246                                std::cerr << "  -b, --buff=COUNT    Number of frames to buffer" << std::endl;
     
    270251        }
    271252        run:
    272         assert( framework );
    273 
    274253        frames.reset(new Frame[nframes]);
    275254        for(unsigned i = 0; i < nframes; i++) {
     
    280259        std::cout << "(Buffering " << nframes << ")" << std::endl;
    281260
    282         thrdlib::init( framework, 2 );
     261        thrdlib::init( 2 );
    283262
    284263        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.so
     1all: fibre.so libthrd-pthread.so.so cforall.so
    22
    33clean:
    4         rm -rf fibre.so pthread.so
     4        rm -rf fibre.so libthrd-pthread.so.so cforall.so
    55
    66CXXFLAGS=-Wall -Wextra -O3 -g -fpic -std=c++17 -pthread -ftls-model=initial-exec
    77
    8 pthread.so: pthread.cpp Makefile
    9         $(CXX) $(CXXFLAGS) -shared -o ${@} ${<}
     8libthrd-pthread.so: thread.cpp thread.hpp Makefile
     9        $(CXX) $(CXXFLAGS) -shared -o $@ $< -DWITH_PTHREADS
    1010
    11 fibre.so: fibre.cpp Makefile
    12         $(CXX) $(CXXFLAGS) -shared -o ${@} ${<} -lfibre
     11libthrd-fibre.so: thread.cpp thread.hpp Makefile
     12        $(CXX) $(CXXFLAGS) -shared -o $@ $< -DWITH_LIBFIBRE -lfibre
    1313
    1414CFAINC=${HOME}/local/include/cfa-dev
     
    1616CFAFLAGS=-z execstack -I${CFAINC} -I${CFAINC}/concurrency -L${CFALIB} -Wl,-rpath,${CFALIB}
    1717
    18 cforall.so: cforall.cpp Makefile
    19         $(CXX) $(CXXFLAGS) $(CFAFLAGS) -shared -o ${@} ${<} -lcfathread -lcfa -ldl -lm
     18libthrd-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
    13#include <pthread.h>
    24#include <errno.h>
     
    9799        // Basic kernel features
    98100        void thrdlib_init( int ) {}
     101        void thrdlib_clean( void ) {}
    99102}
  • 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
    24
    3 #include <cstdarg>                                                                              // va_start, va_end
    4 #include <cstdio>
    5 #include <cstring>                                                                              // strlen
    6 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
    1214
    13 #include <iostream>
    14 #include <string>
     15namespace 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(); }
    1523
    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  
    66        //--------------------
    77        // 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 ) ;
    1313
    1414        //--------------------
    1515        // Basic kernel features
    16         extern void init( const char * name, int procs );
     16        extern void init( int procs );
    1717        extern void clean( void );
    1818};
  • libcfa/src/concurrency/coroutine.cfa

    rccb8c8a r42f6e07  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Oct 23 23:05:24 2020
    13 // Update Count     : 22
     12// Last Modified On : Tue Dec 15 12:06:04 2020
     13// Update Count     : 23
    1414//
    1515
     
    8888static const size_t MinStackSize = 1000;
    8989extern size_t __page_size;                              // architecture pagesize HACK, should go in proper runtime singleton
     90extern int __map_prot;
    9091
    9192void __stack_prepare( __stack_info_t * this, size_t create_size );
     
    206207                __cfaabi_dbg_debug_do(
    207208                        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 ) {
    209210                                abort( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) );
    210211                        }
  • libcfa/src/concurrency/kernel/startup.cfa

    rccb8c8a r42f6e07  
    117117}
    118118
    119 size_t __page_size = 0;
     119extern size_t __page_size;
    120120
    121121//-----------------------------------------------------------------------------
     
    161161        /* paranoid */ verify( ! __preemption_enabled() );
    162162        __cfadbg_print_safe(runtime_core, "Kernel : Starting\n");
    163 
    164         __page_size = sysconf( _SC_PAGESIZE );
    165163
    166164        __cfa_dbg_global_clusters.list{ __get };
     
    681679        #if CFA_PROCESSOR_USE_MMAP
    682680                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);
    684682                if(stack == ((void*)-1)) {
    685683                        abort( "pthread stack creation : internal error, mmap failure, error(%d) %s.", errno, strerror( errno ) );
  • libcfa/src/heap.cfa

    rccb8c8a r42f6e07  
    1010// Created On       : Tue Dec 19 21:58:35 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sun Dec 13 22:04:10 2020
    13 // Update Count     : 984
     12// Last Modified On : Tue Dec 15 21:37:54 2020
     13// Update Count     : 1013
    1414//
    1515
    1616#include <unistd.h>                                                                             // sbrk, sysconf
     17#include <stdlib.h>                                                                             // EXIT_FAILURE
    1718#include <stdbool.h>                                                                    // true, false
    1819#include <stdio.h>                                                                              // snprintf, fileno
     
    7172        // Define the default extension heap amount in units of bytes. When the uC++ supplied heap reaches the brk address,
    7273        // 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),
    7475
    7576        // Define the mmap crossover point during allocation. Allocations less than this amount are allocated from buckets;
     
    115116
    116117// statically allocated variables => zero filled.
    117 static size_t pageSize;                                                                 // architecture pagesize
     118size_t __page_size;                                                                             // architecture pagesize
     119int __map_prot;                                                                                 // common mmap/mprotect protection
    118120static size_t heapExpand;                                                               // sbrk advance
    119121static size_t mmapStart;                                                                // cross over point for mmap
     
    249251#endif // FASTLOOKUP
    250252
    251 static int mmapFd = -1;                                                                 // fake or actual fd for anonymous file
     253static const off_t mmapFd = -1;                                                 // fake or actual fd for anonymous file
    252254#ifdef __CFA_DEBUG__
    253255static bool heapBoot = 0;                                                               // detect recursion during boot
     
    374376
    375377static 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;
    377379        mmapStart = value;                                                                      // set global
    378380
     
    484486#define NO_MEMORY_MSG "insufficient heap memory available for allocating %zd new bytes."
    485487
     488#include <unistd.h>
    486489static inline void * extend( size_t size ) with( heapManager ) {
    487490        lock( extlock __cfaabi_dbg_ctx2 );
     
    490493                // If the size requested is bigger than the current remaining storage, increase the size of the heap.
    491494
    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.
    493497                if ( sbrk( increase ) == (void *)-1 ) {                 // failed, no memory ?
    494498                        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 );
    503506                } // if
    504507                #ifdef __STATISTICS__
     
    508511                #ifdef __CFA_DEBUG__
    509512                // 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 );
    512515                #endif // __CFA_DEBUG__
    513516                rem = heapRemaining + increase - size;
     
    568571                block->header.kind.real.home = freeElem;                // pointer back to free list of apropriate size
    569572        } else {                                                                                        // large size => mmap
    570   if ( unlikely( size > ULONG_MAX - pageSize ) ) return 0p;
    571                 tsize = ceiling2( tsize, pageSize );                    // must be multiple of page size
     573  if ( unlikely( size > ULONG_MAX - __page_size ) ) return 0p;
     574                tsize = ceiling2( tsize, __page_size );                 // must be multiple of page size
    572575                #ifdef __STATISTICS__
    573576                __atomic_add_fetch( &mmap_calls, 1, __ATOMIC_SEQ_CST );
     
    575578                #endif // __STATISTICS__
    576579
    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 );
    578581                if ( block == (HeapManager.Storage *)MAP_FAILED ) { // failed ?
    579582                        if ( errno == ENOMEM ) abort( NO_MEMORY_MSG, tsize ); // no memory
     
    583586                #ifdef __CFA_DEBUG__
    584587                // 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 );
    587590                #endif // __CFA_DEBUG__
    588591                block->header.kind.real.blockSize = tsize;              // storage size for munmap
     
    624627                #endif // __STATISTICS__
    625628                if ( munmap( header, size ) == -1 ) {
    626                         #ifdef __CFA_DEBUG__
    627629                        abort( "Attempt to deallocate storage %p not allocated or with corrupt header.\n"
    628630                                   "Possible cause is invalid pointer.",
    629631                                   addr );
    630                         #endif // __CFA_DEBUG__
    631632                } // if
    632633        } else {
    633634                #ifdef __CFA_DEBUG__
    634635                // 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 ) );
    637638                #endif // __CFA_DEBUG__
    638639
     
    703704
    704705static 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;
    706708
    707709        for ( unsigned int i = 0; i < NoBucketSizes; i += 1 ) { // initialize the free lists
     
    723725
    724726        char * end = (char *)sbrk( 0 );
    725         heapBegin = heapEnd = sbrk( (char *)ceiling2( (long unsigned int)end, pageSize ) - end ); // move start of heap to multiple of alignment
     727        heapBegin = heapEnd = sbrk( (char *)ceiling2( (long unsigned int)end, __page_size ) - end ); // move start of heap to multiple of alignment
    726728} // HeapManager
    727729
     
    741743        #ifdef __CFA_DEBUG__
    742744        if ( heapBoot ) {                                                                       // check for recursion during system boot
    743                 // DO NOT USE STREAMS AS THEY MAY BE UNAVAILABLE AT THIS POINT.
    744745                abort( "boot() : internal error, recursively invoked during system boot." );
    745746        } // if
     
    10481049        // page size.  It is equivalent to memalign(sysconf(_SC_PAGESIZE),size).
    10491050        void * valloc( size_t size ) {
    1050                 return memalign( pageSize, size );
     1051                return memalign( __page_size, size );
    10511052        } // valloc
    10521053
     
    10541055        // Same as valloc but rounds size to multiple of page size.
    10551056        void * pvalloc( size_t size ) {
    1056                 return memalign( pageSize, ceiling2( size, pageSize ) );
     1057                return memalign( __page_size, ceiling2( size, __page_size ) );
    10571058        } // pvalloc
    10581059
     
    11931194                choose( option ) {
    11941195                  case M_TOP_PAD:
    1195                         heapExpand = ceiling2( value, pageSize ); return 1;
     1196                        heapExpand = ceiling2( value, __page_size ); return 1;
    11961197                  case M_MMAP_THRESHOLD:
    11971198                        if ( setMmapStart( value ) ) return 1;
  • tests/heap.cfa

    rccb8c8a r42f6e07  
    1010// Created On       : Tue Nov  6 17:54:56 2018
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Sep 25 15:21:52 2020
    13 // Update Count     : 73
     12// Last Modified On : Tue Dec 15 12:11:51 2020
     13// Update Count     : 79
    1414//
    1515
     
    2727// }
    2828
    29 #define __U_DEFAULT_MMAP_START__ (512 * 1024 + 1)
    30 size_t default_mmap_start() __attribute__(( weak )) {
    31         return __U_DEFAULT_MMAP_START__;
     29size_t default_heap_expansion() {
     30        return 10 * 1024 * 1024;
     31} // default_heap_expansion
     32
     33size_t default_mmap_start() {
     34        return 512 * 1024 + 1;
    3235} // default_mmap_start
    3336
Note: See TracChangeset for help on using the changeset viewer.