Re: [BLACKBOX] Real time & garbage collection

From: Dr. Markus Bautsch <"Dr.>
Date: Tue, 28 Jun 2011 03:21:04 -0400

----boundary-LibPST-iamunique-2118275762_-_-
Content-type: text/plain

Dear Robert !

A couple of years ago I made some research on garbage collection in the
BlackBox system, because there was a common rumour about slow garbage
collection (maybe still from the 1970s). I allocated 10 million objects
(!) in the heap memory, set the appropriate POINTERs to NIL and then
called Kernel.Collect (). I took a fraction of a second to dispose the
complete set of memory. In the mean time the computer systems have
become even faster...

However, did you check the memory load of your operating system?
Sometimes another Gigabyte of primary storage helps a lot.

Best regards

Markus



-----Ursprüngliche Mitteilung-----
Von: Douglas G. Danforth <danforth{([at]})nowhere.xy
An: BLACKBOX{([at]})nowhere.xy
Verschickt: Mo., 27. Jun. 2011, 22:43
Thema: Re: [BLACKBOX] Real time & garbage collection


Robert,
Thank you.  I was aware of Kernel.Collect but was not sure it would be
appropriate.  I need to think about that a little more.
-Doug


On 6/27/2011 1:30 PM, Robert wrote:
Doug

The only possibly relevant idea I can offer is that you can force a
garbage collection (Kernel.Collect).

Maybe if you do this before your critical section of code there will be
less time spent collecting within it ... just a wild guess!


But a 1 second 'hang'; that seems far too long for a collection?


Cheers

Robert



On 27/06/2011 09:20 PM, Douglas G. Danforth wrote:

Folks,

I have produced a product for a company (surprisingly in Switzerland)
that smooths the position of detected eyes from a webcam.

I show two sets of eyes: the original, as given to me by a face
detection dll and my smoothed version of the original.

Every once in a while the images seem to hang (1 second) and
then start to move again.

The author of the face dll claims he doesn't see that effect.

So, I am wondering whether the BlackBox garbage collector is
kicking in. This is just a hypothesis and want to explore it with
the rest of you.

How can I determine (be notified) when the garbage collector starts
and stops?

Is it possible to inhibit the garbage collector? That is, can I create
a
safe region of code where the garbage collector will not be called?

I don't believe I am doing NEW during the eye smoothing operations
but then again I may have over looked a place or places in my code
where I do. How can I determine whether NEW is being called while
the code is running?

By pressing ctrl-alt-del I can watch the total amount of memory that my
process is using and it seems to be fairly constant so if I am calling
NEW it is not of any great amount.

Does the garbage collector mark and sweep through all of allocated
memory
or just memory that has been added since the last time it was called
(just
curious)?

Do you have a suggestions? Any tools in BlackBox that could answer some
of
these questions?

-Doug Danforth

-------------------------------------------------------------------------
-------

No virus found in this message.
Checked by AVG - www.avg.com <
http://www.avg.com>
Version: 10.0.1388 / Virus Database: 1513/3729 - Release Date: 06/27/11

---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
LISTSERV{([at]})nowhere.xy




----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to 
LISTSERV{([at]})nowhere.xy---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to 
LISTSERV{([at]})nowhere.xy----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-2118275762_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBEZWFyIFJvYmVydCAhXHBhcg0K
XHBhcg0KQSBjb3VwbGUgb2YgeWVhcnMgYWdvIEkgbWFkZSBzb21lIHJlc2VhcmNoIG9uIGdhcmJh
Z2UgY29sbGVjdGlvbiBpbiB0aGUgXHBhcg0KQmxhY2tCb3ggc3lzdGVtLCBiZWNhdXNlIHRoZXJl
IHdhcyBhIGNvbW1vbiBydW1vdXIgYWJvdXQ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LibPST-iamunique-2118275762_-_---
Received on Tue Jun 28 2011 - 09:21:04 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:13 UTC