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 area and look for probable
pointers into the heap.
I am stuck in the implementation part, where I am not very sure on
which physical address the static elements are stored for X86
machines. Is the address of the static area stored in some processor
register? If yes how can I access it in a C++ program?
Thanks! 3 1544
R Karthick wrote:
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 area and look for probable
pointers into the heap.
I am stuck in the implementation part, where I am not very sure on
which physical address the static elements are stored for X86
machines. Is the address of the static area stored in some processor
register? If yes how can I access it in a C++ program?
The boilerplate answer is "you cannot". C++ has no concept of "X86".
It has no concept of accessible (for scanning) "static memory area".
All of those things are compiler- and platform-specific and should be
asked about in the newsgroup specialising in your particular platform
and compiler.
There are several commercial implementations of garbage-collecting
memory managers on the market. Perhaps you should give those a look.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Victor Bazarov wrote:
There are several commercial implementations of garbage-collecting
memory managers on the market. Perhaps you should give those a look.
Just for completeness, there's also the free Boehm GC, which claims
(some) support for C++. I've never tried it myself, though. http://www.hpl.hp.com/personal/Hans_Boehm/gc/
On Nov 30, 4:51 pm, Matthias Buelow <m...@incubus.d ewrote:
Victor Bazarov wrote:
There are several commercial implementations of garbage-collecting
memory managers on the market. Perhaps you should give those a look.
Just for completeness, there's also the free Boehm GC, which claims
(some) support for C++. I've never tried it myself, though.
http://www.hpl.hp.com/personal/Hans_Boehm/gc/
Actually, it has very good support for C++. I've used it, at
least with g++ under Linux, and it works quite well.
--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Andreas Suurkuusk |
last post by:
Hi,
I just noticed your post in the "C# memory problem: no end for our problem?"
thread.
In the post you implied that I do not how the garbage collector works and
that I mislead people. Since the thread is over a month old, I decided to
start a new one with my response.
Please see my comments inline.
|
by: CptDondo |
last post by:
I am working on an embedded platform which has a block of battery-backed
RAM. I need to store various types of data in this block of memory -
for example, bitmapped data for control registers, strings for logging,
and structures for data points.
I want to use one function to read data from this block and one function
to write data, for...
|
by: Chris Bardon |
last post by:
I'm working on a class library in .net, and am having a problem that I
can only describe as a memory leak (which garbage collection was
supposed to eliminate). My class library contains a single class, one
member of which is a static SortedList of session data objects. One
of my methods creates a new object on this list, and another removes...
|
by: Rick |
last post by:
Hello,
Below I create a static instance of an object, works well.
public static BasicCounter GlobalCounter = new
BasicCounter("GlobalCounter");
private void Page_Load(object sender, System.EventArgs e)
{
GlobalCounter.Increment();
|
by: Adrian |
last post by:
Hi
I have a JS program that runs localy (under IE6 only) on a PC but it has
a memory leak (probably the known MS one!)
What applications are there that I could use to look at the memory usage of
each object within my JS app to help locate my problem?
Thanks
| |
by: Chuck Cobb |
last post by:
I am creating some static classes with static methods and static variables,
but I have a question: What is the lifetime of static classes and static
variables? Is there any risk that these items might be garbage collected
if they're not used for a period of time?
For example:
public static class test
{
static Collection<string> coll;
|
by: Peter Olcott |
last post by:
It looks like System::Collections::Generic.List throws and OUT_OF_MEMORY
exception whenever memory allocated exceeds 256 MB. I have 1024 MB on my system
so I am not even out of physical RAM, much less virtual memory.
Are other people experiencing this same problem?
|
by: Nehil |
last post by:
can i find about following 2 things, by providing my own API of
functions for a C program :
1) static, global and const section of variables (pointers only), and
to pickout only those which are dynamically allocated.
2) Local variable which are pointers and have dynamically allocated
memory.
Actually, i want to develop an API, which...
|
by: Jack Jackson |
last post by:
On Wed, 11 Jun 2008 07:32:30 +0200, "Fred" <foleide@free.fr.invalid>
wrote:
If the control will soon be eligible for garbage collection, then no.
If the control won't be eligible for garbage collection soon, then
setting the Tag property to null will allow the object references by
Tag to be collected sooner (assuming there are no other...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...
| |