Changeset 36982fc for src/libcfa/concurrency/coroutine.c
- Timestamp:
- Nov 29, 2017, 2:50:33 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 875a72f
- Parents:
- 8a0a64d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/coroutine.c
r8a0a64d9 r36982fc 76 76 void ^?{}(coStack_t & this) { 77 77 if ( ! this.userStack && this.storage ) { 78 LIB_DEBUG_DO(78 __cfaabi_dbg_debug_do( 79 79 if ( mprotect( this.storage, pageSize, PROT_READ | PROT_WRITE ) == -1 ) { 80 80 abortf( "(coStack_t *)%p.^?{}() : internal error, mprotect failure, error(%d) %s.", &this, errno, strerror( errno ) ); … … 131 131 132 132 // assume malloc has 8 byte alignment so add 8 to allow rounding up to 16 byte alignment 133 LIB_DEBUG_DO( this->storage = memalign( pageSize, cxtSize + this->size + pageSize ) );134 LIB_NO_DEBUG_DO( this->storage = malloc( cxtSize + this->size + 8 ) );133 __cfaabi_dbg_debug_do( this->storage = memalign( pageSize, cxtSize + this->size + pageSize ) ); 134 __cfaabi_dbg_no_debug_do( this->storage = malloc( cxtSize + this->size + 8 ) ); 135 135 136 LIB_DEBUG_DO(136 __cfaabi_dbg_debug_do( 137 137 if ( mprotect( this->storage, pageSize, PROT_NONE ) == -1 ) { 138 138 abortf( "(uMachContext &)%p.createContext() : internal error, mprotect failure, error(%d) %s.", this, (int)errno, strerror( (int)errno ) ); … … 144 144 } // if 145 145 146 LIB_DEBUG_DO( this->limit = (char *)this->storage + pageSize );147 LIB_NO_DEBUG_DO( this->limit = (char *)libCeiling( (unsigned long)this->storage, 16 ) ); // minimum alignment146 __cfaabi_dbg_debug_do( this->limit = (char *)this->storage + pageSize ); 147 __cfaabi_dbg_no_debug_do( this->limit = (char *)libCeiling( (unsigned long)this->storage, 16 ) ); // minimum alignment 148 148 149 149 } else {
Note: See TracChangeset
for help on using the changeset viewer.