This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: Fix BSD Memory Leak
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Jay Foster <jay at systech dot com>
- Cc: "'Andrew Lunn'" <andrew dot lunn at ascom dot ch>, "'ecos-patches at sources dot redhat dot com'" <ecos-patches at sources dot redhat dot com>
- Date: Tue, 29 Jul 2003 16:02:47 +0200
- Subject: Re: Fix BSD Memory Leak
- References: <80B97DE95AEED311BA580050047FE98494F64D@mail.systech.com>
On Mon, Jul 28, 2003 at 11:04:02AM -0700, Jay Foster wrote:
> The attached patch fixes a memory leak in the BSD stack for eCos. The
> accept() call would leak 48 bytes on each call. The exact number of bytes
> leaked could vary on different platforms, as it depends on the amount of
> roundup done for alignment issues. On my platform ARM7TDMI, it was 32 bytes
> + 16 (for roundup).
>
> I also moved the splx(s) statement into the 'else' case of the conditional
> compile, since it corresponds with the splx() call in the 'if' portion of
> the conditional compile.
Thanks for the patch. Its been committed.
Andrew