apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44432] New: - patch - proposal for application function hooks
Date Fri, 15 Feb 2008 15:27:08 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44432>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44432

           Summary: patch - proposal for application function hooks
           Product: APR
           Version: HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: vwfinley@comcast.net


In systems where system resources are extremely limited or managed tightly,
applications may be unable to recover from system failures that occur within APR.

For an example: in an embedded system where applications are given an initial
virtual memory limit, malloc in an apr_pool can fail.

The patch I have available provides a way for to applications to easily install
their own hook handler functions into APR.  The handler functions can be called
easily by APR on failure and will give the application opportunity to recover
from the system error and for APR to retry.  

For example: on a malloc failure in apr_pool, the application could attempt to
increase virtual memory and have APR retry the malloc.

There are some similarities between this patch and the hooks facility in APU;
however, this patch is more limited in scope because it is targeted toward
handling system failures.  The hooks facility in APU uses dynamic allocation to
manage a chain of handler functions.  This is something to be avoided when
trying to catch system errors like allocation failures.  The proposed patch
instead uses static pointers to single functions.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message