Hi, Is possible to turn the garbage collector off in 7.x? how can I make it?
Thanks in advance. regards andrea |
Andrea It is not possible to turn the GC off and
if you could the some of the memory spaces would fill up in milliseconds. It is
possible to tune some GC parameters, though is not usually necessary. Perhaps
you could tell us a bit more about your problem -----
From: Andrea Gammachi
[mailto:[hidden email]] Hi, Is possible to turn
the garbage collector off in 7.x? how can I make it? |
In reply to this post by Andrea Gammachi
As has already been said, an explanation of your goal would help get better
answers. While you can't turn GC off, you can run a process in such a way that it won't get interrupted: ["code for process here"] valueUninterruptably. However, note the warning: "Execute the block, without interrupts (from Process>>interruptWith:) with respect to the receiver (process), which may or may not be the currently active process. Note that this does not prevent preemption by higher priority processes. Use this facility VERY sparingly!" So if you set that process to a higher priority than anything else, nothing image level will interrupt it. Bear in mind, that's a very dangerous thing to do unless you're extremely careful. At 06:17 PM 4/4/2006, you wrote: >Hi, Is possible to turn the garbage collector off in 7.x? how can I make it? >Thanks in advance. >regards > >andrea <Talk Small and Carry a Big Class Library> James Robertson, Product Manager, Cincom Smalltalk http://www.cincomsmalltalk.com/blog/blogView |
In reply to this post by Joerg Beekmann, DeepCove Labs (YVR)
Hi, thanks for your response to both Joerg and James.
My comprehension with GC is not complete at all, but according with your repy now I have to ask, as it's a kind of intrigue to me: why if I turn the GC off and the environment is idle, the memory would fill up anyway? I mean, what objects are created (not related with GC) when the environment is idle? Cheers Andrea 2006/4/4, Joerg Beekmann <[hidden email]>:
|
Andrea Of what value is an idle environment, you
might as well quit the image. Part of the smalltalk programming style is
to create and release small objects. for example, a := ‘hello’
, b. creates a new string object. These small objects would eventually fill up object
memory if there were no gc. I suggest you read the VW memory
management doc in the doc/TechNotes directory. You can also find
a similar description in the “documentation”
protocol on the class side of ObjectMemory. Now having said all that, there are ways
to manage how the gc interacts with and influences a running application.
If you would provide a description of your problem we can help you. Terry From: Andrea Gammachi
[mailto:[hidden email]] Hi, thanks for your
response to both Joerg and James. 2006/4/4, Joerg Beekmann <[hidden email]>: Andrea It is not possible to turn the GC off and if you could the
some of the memory spaces would fill up in milliseconds. It is possible to tune
some GC parameters, though is not usually necessary. Perhaps you could tell us
a bit more about your problem -----
From: Andrea Gammachi [mailto:[hidden email]]
Hi, Is possible to turn the garbage collector off in
7.x? how can I make it? |
In reply to this post by Andrea Gammachi
Windows is constantly sending events to VW, and handling these creates objects (although IIRC VW does optimize by reusing the same array for each event). There are also background processes that wake up every now and then, and their code too creates objects (pretty much all code does!). The only way a created object disappears is if the garbage collector eats it, so without gc these will eventually build up.
You can turn gc off by editing the code in MemoryPolicy that starts a gc. Note there are several kinds of gc, so you need to consider what to do with each. The gc stuff is also already active in processes in the background, so if the piece of code you change is directly in one of those processes, you’ll need to stop and restart the process to get your change to have an effect.
Steve
-----Original Message-----
Hi, thanks for your
response to both Joerg and James. 2006/4/4, Joerg Beekmann <[hidden email]>: Andrea
It is not possible to turn the GC off and if you could the some of the memory spaces would fill up in milliseconds. It is possible to tune some GC parameters, though is not usually necessary. Perhaps you could tell us a bit more about your problem
-----
From: Andrea Gammachi [mailto:[hidden email]]
Hi, Is possible to turn the garbage collector off in
7.x? how can I make it?
|
In reply to this post by Andrea Gammachi
None would be created. If that's your only concern, then turning off GC
is easy. It's automatically off when you're not creating new
objects.
At 09:08 PM 4/6/2006, Andrea Gammachi wrote: Hi, thanks for your response to both Joerg and James. --
Alan Knight [|], Cincom Smalltalk Development
"The Static Typing Philosophy: Make it fast. Make it right.
Make it run." - Niall Ross
|
Free forum by Nabble | Edit this page |