Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Memory Leaks with pointers

 
Thread Tools Search this Thread
Old 08-05-2008, 05:24 PM   #1
Default Memory Leaks with pointers


Consider the following:
type a_t;
type a_t_ptr is access a_t;

type b_t;
type b_t_ptr is access b_t;

type a_t is array(integer range <>) of integer;
type b_t is array(integer range <>) of a_t_ptr;

begin

process
variable P : b_t_ptr;
begin

P := new b_t(1 to 10);

for i in 1 to 10 loop
p(i) = new a_t(1 to 10);
end loop;

DEALLOCATE(P);
wait;
end process;

have I just caused a memory leak by not deallocating all the elements
in the top level array? would you have to quit the simulator to free
it again, or just end the simulation?


Tricky
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
OCZ 6GB Triple-Channel 1333 MHz DDR3 Memory Kit Admin Front Page News 0 02-16-2009 01:27 PM
memory upgrade -D- A+ Certification 1 02-03-2007 01:01 AM
Re: What memory to use? me A+ Certification 0 12-14-2004 03:33 AM
Re: Memory stick question Nildram A+ Certification 1 01-14-2004 02:41 PM
Half memory: lost? Joe A+ Certification 4 09-04-2003 08:57 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46