This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Can I use the dynamic memory allocation on the class object? Thanks a lot.


Well, that's certainly one way to do it, using the in-place version of new -
but you shouldn't have to do that.  I'm guessing that Nick Garnett's
solution is the right one...

# -----Original Message-----
# From: QiangHuang [mailto:jameshq@liverpool.ac.uk]
# Sent: Tuesday, April 29, 2003 11:34 AM
# To: Schumacher, Gordon
# Cc: Ecos-Discuss
# Subject: RE: [ECOS] Can I use the dynamic memory allocation 
# on the class
# object? Thanks a lot.
# 
# 
# Thank you very much for your help.
# Maybe I was not doing in the right way. The problem is I can 
# use new to
# create a class object when building the eCOS library. but 
# when linking with
# my application I got the following error:
# 
# warning: no memory  region specified for section `.eh_frame'
# section .eh_frame [00092508 -> 00092d8f] overlaps section 
# .text [00040040 ->
# 00093287].
# 
# but this can be done with malloc() without problem.
# 
# Maybe I have missed something. Thanks  a lot.
# 
# BTW can I do it by the replacement new as:
# 
# 
# cyg_uint8 *pbuf = malloc( sizeof(my_class) );
# 
# my_class *pclass = new(pbuf) my_class;?	// will the 
# class constructor be
# called here?
# 
# Thanks a lot.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]