OS hooks?

Joel Sherrill joel.sherrill at OARcorp.com
Tue Oct 31 13:53:19 UTC 2000


Rosimildo da Silva wrote:
> 
> Jake Janovetz wrote:
> >
> > Howdy...
> >
> >    I'd like to know where I can find a list (if there is one) of
> > OS information hooks.  Essentially, I'd like to find out how much
> > memory is allocated, how it's allocated, etc.  I know that the
> > cpu monitor contains code that extracts the number of ticks spent
> > in each thread.  This sort of information is nice.  Is there
> > something similar for memory?  I suppose that memory allocation
> > is not associated with a thread, but at least the remaining
> > heap size is tracked, eh?
> >

Nick Simon <Nick.SIMON at syntegra.bt.co.uk> recently submitted
code to give some statistics on a heap.  I modified it to
add a directive rtems_get_information.  And there is at least
one new routine in the C heap malloc family to get the amount
of free memory left.

region_get_information() and heap_get_information() fill in
a structure so it should be relatively painless to add more
information to them.  

This will be in the next snapshot.
 
> I have written something like that as an omniOrb example.
> Look at this location:
> 
> http://members.nbci.com/rosimildo/rtems_rrm.html
> 
> Look at these files:
> 
>    src/examples/rtems_rrm/server/resources.h
>    src/examples/rtems_rrm/server/resources.cc
>    src/examples/rtems_rrm/server/rrm_test.cc
> 
> You should be able to remove the OmniOrb depedency of
> the "test program" very quickly. Just delete the
> threads, and remove the includes.
> 
> The resources encapsulation is just a C++ wrapper, and it
> should compile just fine without OmniOrb.
> 
> --
> Rosimildo da Silva            rdasilva at connectel.com
> ConnectTel, Inc.              Austin, TX -- USA
> Phone : 512-338-1111          Fax : 512-918-0449
> Mobile: 512-632-7579
> Company Page: http://www.connecttel.com
> Home Page: http://members.xoom.com/rosimildo/

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list