Re: efree/emalloc in sapi

From: Date: Tue, 03 Apr 2001 21:08:35 +0000
Subject: Re: efree/emalloc in sapi
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-50756@lists.php.net to get a copy of this message
hi, i know. the problem is i have used the thttpd sapi module as a sample and it is supposed to be stable. i have solved my problem by using plain malloc/free - my reason to share this experience is that there may be a leak or segfault in some of the sapi modules. i haven't found neighter bug nor leak still but it is possible. can someone tell me the exact places where emalloced memory begins to be tracked and where the leaks are efreed? b. > BB>> i have hit on this issue while trying to make a sapi module. my > BB>> problem was that memory emalloc-ed _before_ the request got > BB>> efree-ed by the memory manager after the request and when i > BB>> efree it afterwards a total memory mess occurs (sigsegv, > BB>> infinite loop in libc free or something more nasty)... > > You probably should use plain old malloc when you not inside the request.

« previous php.dev (#50756) next »