apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Tuttle <ntut...@opendemand.com>
Subject Question regarding approach to memory allocation in the APR
Date Thu, 16 Oct 2003 21:16:17 GMT
The conditions of lack of success for apr_socket_create() should include 
a case where memory wasn't available to allocate for the creation of the 
APR socket structure, but I did not see evidence of this in either the 
Win32 or Unix versions of the APR library. Both functions call a void 
function alloc_socket() which does the allocation and then immediately 
sets members of the allocated socket, so they are obviously assuming the 
allocation occurred. Unfortunately, real software cannot be so sure. I 
was wondering if (1) the APR provided alternate functions which check 
for this failure case, and (2) how many APR functions are doing memory 

-Norman Tuttle, OpenDemand Systems Developer, ntuttle@opendemand.com

View raw message