Wireshark-dev: Re: [Wireshark-dev] Query regarding malloc and ep_alloc

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Tue, 10 Oct 2006 15:28:38 +0200 (CEST)
Hi,

Sure you can use malloc, but please read doc/README.malloc for all the
benefits ep_alloc and friends provide.

The fact that you get undefined reference means that you're working with
old sourcefiles???

Thanx,
Jaap

On Tue, 10 Oct 2006, prashanth joshi wrote:

> Hi , can i use malloc to allocate memory in ethereal code ?
>   What i want to do is to allocate memory and then fill in the contents and then add it to the display tree.
>   If I use malloc, will not it cause problems like platform dependence and memory leaks?
>   I used ep_alloc( ) but i'm getting error " undefined reference to ep_alloc".
>   Also, can i use malloc for any general purpose data manipulation....?, say like allocating a structure sized memory using malloc and then copying n bytes of the tvbuff in to the allocated memory and then manipulate the data.
>   Regards,
>   Prashanth
>