Re: [BLACKBOX] Real time & garbage collection

From: [at]} <Romiras>
Date: Tue, 28 Jun 2011 13:46:09 +0300


For debugging of module Kernel, look at procedure Kernel.watcher and constant debug. By setting them a proper values, you can notify your program when garbage collection is performed (in log, for example). If you do, you must recompile a module Kernel.

The garbage collection is invoked in the following situations:

*

        program want to allocate memory dynamically for some object
*

        insufficient resources (memory or too many open file handles) or module is unloaded
*

        before a program exits (calling finalizers)
*

        by forcing manual calling of Services.Collect or Kernel.Collect

Try put NEW out of loop-computations, e.g. preallocate memory for dynamical objects before intensive computations.
Use static objects, so a GC will not allocate memory at run time for them.

The latency may come from one of levels or even all of them: hardware, system software (OS, drivers) or application software (particular program).

Which version of BlackBox you tried your software on: 1.5, 1.6 RC5 or RC6? Version 1.6 RC6 includes improved garbage collection as far as I know.
Which version of OS you and author of the face dll tested on?


2011/6/27 Douglas G. Danforth <danforth{([at]})nowhere.xy
> 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
>
> ---- 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
Received on Tue Jun 28 2011 - 12:46:09 UTC

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