ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

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

From: prashanth joshi <prashanthsjoshi2000@xxxxxxxxx>
Date: Tue, 10 Oct 2006 06:29:59 -0700 (PDT)


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.
 
I'm talking about platform dependece because on some platforms like malloc is implemented as a system call, and on some platforms like Vxworks it is implemented as a function.
Regards,
Prashanth
 
 


Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1�/min.