replacement of talloc
mailing.akib at gmail.com
Sun Jul 22 04:27:00 MDT 2012
so whats the solution??
if i need to implement malloc manually for arm7 how can i do that??
any help or hint will be great
On Sun, Jul 22, 2012 at 3:51 PM, ronnie sahlberg
<ronniesahlberg at gmail.com>wrote:
> You can not substitute malloc() with memset()
> they serve completely different purposes.
> On Sun, Jul 22, 2012 at 8:17 PM, akib sayyed <mailing.akib at gmail.com>
> > didnt get you
> > here is talloc code that has been use.
> > i can use memset like this memset(atr,0,sizeof(atr)); in firmware
> > so in above code if i replace complete malloc with memset will it work??
> > On Fri, Jul 20, 2012 at 1:48 AM, Alexander Bokovoy <ab at samba.org> wrote:
> >> On Thu, Jul 19, 2012 at 7:48 PM, akib sayyed <mailing.akib at gmail.com>
> >> wrote:
> >> > i am compiling using gnutoolchain to compile my code. and error is
> >> > while compiling its while linking
> >> So it has missing symbols, most likely in form of malloc and free.
> >> Your setup is basically a single statically linked program. You would
> >> need to implement memory management on your own. This is actually
> >> easier to be done with talloc as you can simply use a single talloc
> >> pool internally that hands out memory out of a single raw memory
> >> chunk. Since talloc already hides malloc use from the original program
> >> you would need to rewrite few places within talloc where memory is
> >> allocated.
> >> > On Thu, Jul 19, 2012 at 9:55 PM, Alexander Bokovoy <ab at samba.org>
> >> >>
> >> >> On Thu, Jul 19, 2012 at 7:21 PM, akib sayyed <mailing.akib at gmail.com
> >> >> wrote:
> >> >> > yes it does run calypso but only some part is ran on actual calypso
> >> and
> >> >> > actual main part in ran on pc
> >> >> > in other words layer 1 is ran on calypso and l2 l3 are on host pc.
> >> >> > i want to port l2 l3 on calypso
> >> >> I don't think you'll get any success in 256KiB of memory there. But
> >> >> luck.
> >> >> Is there any specific error when compiling talloc?
> >> --
> >> / Alexander Bokovoy
More information about the samba-technical