Class | Raindrops |
In: |
lib/raindrops.rb
(CVS)
lib/raindrops.rb (CVS) ext/raindrops/raindrops.c (CVS) |
Parent: | Object |
call-seq:
rd.evaporate! -> nil
Releases mmap()-ed memory allocated for the Raindrops object back to the OS. The Ruby garbage collector will also release memory automatically when it is not needed, but this forces release under high memory pressure.
PAGE_SIZE | = | SIZET2NUM(rd_page_size) | The size of one page of memory for a mmap()-ed Raindrops region. Typically 4096 bytes under Linux. | |
SIZE | = | SIZET2NUM(raindrop_size) |
The size (in bytes) of a slot in a Raindrops object. This is the size of a word on single CPU systems and
the size of the L1 cache line size if detectable.
Defaults to 128 bytes if undetectable. |
|
MAX | = | ULONG2NUM((unsigned long)-1) | The maximum value a raindrop counter can hold |
Returns the number of slots allocated (but not necessarily used) by the Raindrops object.
Releases mmap()-ed memory allocated for the Raindrops object back to the OS. The Ruby garbage collector will also release memory automatically when it is not needed, but this forces release under high memory pressure.
Returns the number of counters a Raindrops object can hold. Due to page alignment, this is always equal or greater than the number of requested slots passed to Raindrops.new