public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Scott Dattalo <scott@dattalo.com>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] malloc vs. new
Date: Fri, 21 Jun 2002 20:02:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.44.0206211911500.28777-100000@ruckus.brouhaha.com> (raw)


In a project I'm porting to eCos there is some C++ code. Consequently, 
there are several new() calls for creating new objects. Unfortunately, 
calls to new() hang. Specifically, the kernel is unable to allocate memory 
and throws an exception. This switches control to the exception thread and 
control is never released...

Calls to malloc, OTOH, work just fine.

I've sifted through the documentation and the best I could come up with is 
this snippet:

#define MEMORY_BUFFER  0x1000
char StaticMemoryBuffer[MEMORY_BUFFER];

...


  cyg_handle_t mempool;
  cyg_mempool_var mempool_obj;
  cyg_mempool_var_create(StaticMemoryBuffer, MEMORY_BUFFER, &mempool, 
&mempool_obj);

This still fails. How does one provide a memory allocation buffer for 
new()?

Scott




-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

             reply	other threads:[~2002-06-22  2:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-21 20:02 Scott Dattalo [this message]
2002-06-23 14:40 Dan Conti
2002-06-23 14:56 ` Scott Dattalo
2002-06-24  4:27   ` Pierre Merlin
2002-06-24 13:25 ` Scott Dattalo
2002-06-24 13:27   ` Scott Dattalo
2002-06-24 15:07     ` Gary Thomas
2002-06-24 19:05       ` Scott Dattalo
2002-06-25  2:32         ` Tim Drury
2002-06-25  6:45     ` Kjell Svensson
     [not found]       ` <200206250843.51339.tdrury@siliconmotorsports.com>
2002-06-25 11:12         ` Kjell Svensson
2002-06-25  4:51 Koeller, T.
2002-06-25  7:00 ` Tim Drury
2002-06-25 11:20 ` Daniel Leu
2002-06-25 23:38 ` Tim Drury
2002-06-26  3:38 Koeller, T.
2002-06-26  8:57 ` Tim Drury
2002-06-26  9:12 Koeller, T.
2002-06-27  1:48 Koeller, T.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44.0206211911500.28777-100000@ruckus.brouhaha.com \
    --to=scott@dattalo.com \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).