You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Erik Huelsmann <eh...@gmail.com> on 2006/12/10 22:13:23 UTC

ra_dav && out-of-memory in Neon

Working on the ra_dav-refactoring branch, I noticed that sometimes
succesfull creation of Neon resources is explicitly checked: Most of
the time, for example, is the return value from ne_request_create()
checked for non-nullity.

Checking the neon sources, all Neon ever does in its constructors is
allocate memory and initialize it. When we fail to allocate memory in
our libraries, we just abort().

I'd like to replace these explicit checks (and the subsequent -memory
allocating- creation of an error) with abort calls in the functions we
wrapped around these Neon constructors. Especially since at other
times, we don't check for nullity at all (for example when creating
lock structures...).

So, anybody with objections?

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_dav && out-of-memory in Neon

Posted by Erik Huelsmann <eh...@gmail.com>.
On 12/11/06, Daniel Rall <dl...@collab.net> wrote:
> On Sun, 10 Dec 2006, Erik Huelsmann wrote:
>
> > Working on the ra_dav-refactoring branch, I noticed that sometimes
> > succesfull creation of Neon resources is explicitly checked: Most of
> > the time, for example, is the return value from ne_request_create()
> > checked for non-nullity.
> >
> > Checking the neon sources, all Neon ever does in its constructors is
> > allocate memory and initialize it. When we fail to allocate memory in
> > our libraries, we just abort().
> >
> > I'd like to replace these explicit checks (and the subsequent -memory
> > allocating- creation of an error) with abort calls in the functions we
> > wrapped around these Neon constructors. Especially since at other
> > times, we don't check for nullity at all (for example when creating
> > lock structures...).
> >
> > So, anybody with objections?
>
> Nope, this sounds good, especially if it's consistent with
> Subversion's usual pattern.

Done.

bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: ra_dav && out-of-memory in Neon

Posted by Daniel Rall <dl...@collab.net>.
On Sun, 10 Dec 2006, Erik Huelsmann wrote:

> Working on the ra_dav-refactoring branch, I noticed that sometimes
> succesfull creation of Neon resources is explicitly checked: Most of
> the time, for example, is the return value from ne_request_create()
> checked for non-nullity.
> 
> Checking the neon sources, all Neon ever does in its constructors is
> allocate memory and initialize it. When we fail to allocate memory in
> our libraries, we just abort().
> 
> I'd like to replace these explicit checks (and the subsequent -memory
> allocating- creation of an error) with abort calls in the functions we
> wrapped around these Neon constructors. Especially since at other
> times, we don't check for nullity at all (for example when creating
> lock structures...).
> 
> So, anybody with objections?

Nope, this sounds good, especially if it's consistent with
Subversion's usual pattern.