473,503 Members | 2,075 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory concept in vb

how the data will be stored in Stack or Heap

Nov 20 '05 #1
6 1341
Cor
Hi Ramana,

In bytes

Was this the question?

Cor
how the data will be stored in Stack or Heap


Nov 20 '05 #2
* "Ramana" <ch************@rediffmail.com> scripsit:
how the data will be stored in Stack or Heap


As this is not a question related to VB.NET, you may want to post the
question to a more general group like microsoft.public.dotnet.general.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Ot

"Cor" <no*@non.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
Hi Ramana,

In bytes

Was this the question?

Cor
how the data will be stored in Stack or Heap



Cor,

Are you sure you don't work for Microsoft? Your answer was technically
correct, but not very useful (as articles from MS often are).

In any case... Although I am not Ramana, I have a related thoughts so I
thought I'd drop it in this thread.

I suspect that the "stack" is the run-time stack used by the executing
processes. There would be only one run-time stack to keep track of all the
different threads and for use within a thread. Since it is a stack, items
are pushed onto it and popped off. Eventually everything in the stack will
be "used up." Please correct me if this is a wrong guess.

My guess is that the "heap" is another data structure that is also used and
managed by the executing processes. There seems to be a garbage collection
involved with this entity. That is, when data on the heap is no longer
referenced by anything, it is eligible to be deleted. Unlike the stack,
not everything put on the heap is "used up." Again, please correct me if I
am wrong.

If this turns out to be correct guessing, and is confirmed by a real
expert, like Cor, perhaps this also would answer Ramana's question.

Regards.
Nov 20 '05 #4
Cor
Hi Ot,

On a certain moment, it did not interest me anymore how memory management
was done.

(Therefore, my answer about bytes was exact what I was thinking)

It can only be interesting for me if I am in doubt if it is sufficient for
the purpose of the computer.

At the moment it does not interest me at all where it is. It is there where
the OS designers (or even the ones who made the framework) have placed it.

(But the way you did write it is the same as I think about it, and the only
thing I add therefore is, that I think it is absolutly not intresting when a
pointer is given free or the garbage collector is working if there is enough
memory)

(With the executing processes you mean of course executing program processes
managed by the OS or whatever)

Cor

In any case... Although I am not Ramana, I have a related thoughts so I
thought I'd drop it in this thread.

I suspect that the "stack" is the run-time stack used by the executing
processes. There would be only one run-time stack to keep track of all the different threads and for use within a thread. Since it is a stack, items
are pushed onto it and popped off. Eventually everything in the stack will be "used up." Please correct me if this is a wrong guess.

My guess is that the "heap" is another data structure that is also used and managed by the executing processes. There seems to be a garbage collection involved with this entity. That is, when data on the heap is no longer
referenced by anything, it is eligible to be deleted. Unlike the stack,
not everything put on the heap is "used up." Again, please correct me if I am wrong.

If this turns out to be correct guessing, and is confirmed by a real
expert, like Cor, perhaps this also would answer Ramana's question.

Regards.

Nov 20 '05 #5
* "Ot" <ur***@tds.invalid (use net)> scripsit:
Are you sure you don't work for Microsoft? Your answer was technically
correct, but not very useful (as articles from MS often are).


LOL.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
There would be only one run-time stack to keep track of all the
different threads and for use within a thread.
Each thread has its own stack.

Since it is a stack, items
are pushed onto it and popped off. Eventually everything in the stack will
be "used up." Please correct me if this is a wrong guess.


I'm not sure what you mean by "used up".

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3669
by: Ganesan selvaraj | last post by:
I using C# .net. i want to split the text files based of the some condition. my source text file size may be 4 kb to 4 gb. some time when i split the i got the "out of memory exception. when i...
46
4090
by: sbayeta | last post by:
Hi, I'd like to know who is responsible of memory recycling and defragmentation in a C/C++ program, assuming all the memory allocation/deallocation is done using malloc/free or new/delete. ...
6
3193
by: TIM | last post by:
for example i have one simple programm int main() { int test = NULL; while(1){ printf("%d\n",test); getch(); test++; }
10
2755
by: s.subbarayan | last post by:
Dear all, I happen to come across this exciting inspiring article regarding memory leaks in this website: http://www.embedded.com/story/OEG20020222S0026 In this article the author mentions:...
74
4588
by: ballpointpenthief | last post by:
If I have malloc()'ed a pointer and want to read from it as if it were an array, I need to know that I won't be reading past the last index. If this is a pointer to a pointer, a common technique...
62
17618
by: ivan.leben | last post by:
How can I really delete a preloaded image from memory/disk cache? Let's say I preload an image by creating an Image object and setting its src attribute to desired URL: var img = new Image();...
21
8346
by: llothar | last post by:
Hello, i need to manage a heap in shared memory. Does anybody know about a portable (win32+mac+posix) c implementation for this.
3
1534
by: R Karthick | last post by:
Hi, I am in the process of designing a conservative garbage collector for C ++. As one of the requirement of conservative garbage collection, I will have to scan through the static memory...
13
2833
by: Ilias Lazaridis | last post by:
How to detect memory leaks of python programms, which run in an environment like this: * Suse Linux 9.3 * Apache * mod_python The problem occoured after some updates on the infrastructure....
66
3622
by: Why Tea | last post by:
typedef struct some_struct { int i; short k, int m; char s; } some_struct_t; Assuming 16 bit or 32-bit alignment, can I assume that s always gets 4 or 8 bytes of allocation due to padding
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.