<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3020" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=985015608-11052007><FONT face=Arial 
color=#0000ff size=2>Sorry forgot to mention, I'm using RTEMS 
4.6.6.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=985015608-11052007><FONT face=Arial 
color=#0000ff size=2>Also note that I've tried calloc which gives me the same 
problem.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> 
rtems-users-bounces+s.bitton=sstl.co.uk@rtems.org 
[mailto:rtems-users-bounces+s.bitton=sstl.co.uk@rtems.org] <B>On Behalf Of 
</B>Samuel Bitton<BR><B>Sent:</B> 11 May 2007 10:27<BR><B>To:</B> RTEMS Users 
Mailing List<BR><B>Subject:</B> malloc problem<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial size=2>I am working on an 
application running on 386 with custom built BSP.</FONT></SPAN></DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial size=2>Calls to malloc in 
my application keep returning a null value. malloc_free_space reports a free 
heap of 3.9M (as I would expect for my configuration).</FONT></SPAN></DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial size=2>I've tried multiple 
calls to malloc interleaved with a check of the free heap and it indicates that 
the free heap goes down correctly in line with the memory I try to malloc but 
malloc always returns null.</FONT></SPAN></DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial size=2>Is that a known bug 
with malloc? Or am I missing something somewhere?</FONT></SPAN></DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial size=2>Thanks for your 
helps</FONT></SPAN></DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=093222108-11052007><FONT face=Arial 
size=2>Sam</FONT></SPAN></DIV>
<P>This e-mail and any attachments may contain confidential and<BR>privileged 
information. If you are not the intended recipient,<BR>please notify the sender 
immediately by return e-mail, delete this<BR>e-mail and destroy any copies. Any 
dissemination or use of this<BR>information by a person other than the intended 
recipient is<BR>unauthorised and may be illegal.<BR><BR>Surrey Satellite 
Technology Limited<BR>Registered Office: Senate House, University of Surrey, 
Guildford, <BR>Surrey, GU2 7XH Registered in England & Wales No. 1916260 . 
VAT <BR>Registration No. GB 413 5711 79<BR></P></BODY></HTML>

<p>

This e-mail and any attachments may contain confidential and<br>
privileged information. If you are not the intended recipient,<br>
please notify the sender immediately by return e-mail, delete this<br>
e-mail and destroy any copies. Any dissemination or use of this<br>
information by a person other than the intended recipient is<br>
unauthorised and may be illegal.<br>
<br>
Surrey Satellite Technology Limited<br>
Registered Office: Senate House, University of Surrey, Guildford, <br>
Surrey, GU2 7XH   Registered in England & Wales No. 1916260 . VAT <br>
Registration No. GB 413 5711 79<br>
</p>