diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-01-29 17:16:56 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-01-29 17:16:56 +0000 |
commit | 3fb5b8807f96a1b66c7430d99cd91889cc14b0b4 (patch) | |
tree | 4fce5356d9e6bd1a7553787fc54475d9a08f0892 | |
parent | 0254fbaaa4706a36fee8615d2067dadd397b40bb (diff) | |
download | ATCD-3fb5b8807f96a1b66c7430d99cd91889cc14b0b4.tar.gz |
*** empty log message ***
-rw-r--r-- | ace/MEM_SAP.i | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/ace/MEM_SAP.i b/ace/MEM_SAP.i index ad35e621ae1..b7b6ff58d83 100644 --- a/ace/MEM_SAP.i +++ b/ace/MEM_SAP.i @@ -19,7 +19,8 @@ ACE_MEM_SAP::acquire_buffer (const ssize_t size) return 0; // not initialized. size_t *lptr = ACE_static_cast (size_t *, - this->shm_malloc_->malloc (sizeof (size_t) + size)); + this->shm_malloc_->malloc (sizeof (size_t) + size)); + *lptr = size; ++lptr; @@ -64,10 +65,19 @@ ACE_MEM_SAP::get_buf_len (const off_t off, void *&buf) if (this->shm_malloc_ == 0) return -1; - size_t *lptr = (size_t*) ((char *) this->shm_malloc_->memory_pool ().base_addr () + off); - buf = lptr + 1; + ssize_t retv = 0; + + ACE_SEH_TRY + { + size_t *lptr = (size_t*) ((char *) this->shm_malloc_->memory_pool ().base_addr () + off); + buf = lptr + 1; + retv = *lptr; + } + ACE_SEH_EXCEPT (this->shm_malloc_->memory_pool ().seh_selector (GetExceptionInformation ())) + { + } - return *lptr; + return retv; } ASYS_INLINE int |