Class: Hwloc::ObjMemory

Inherits:
Struct
  • Object
show all
Defined in:
lib/hwloc/Obj.rb

Instance Attribute Summary

Attributes inherited from Struct

#topology

Instance Method Summary collapse

Methods inherited from Struct

#[], #method_missing

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Hwloc::Struct

Instance Method Details

#page_typesObject



212
213
214
215
216
217
218
219
# File 'lib/hwloc/Obj.rb', line 212

def page_types
  page_types_ptr = self[:page_types]
  return page_types_len.times.collect { |i|
    pt = ObjMemoryPageType::new(page_types_ptr+i*ObjMemoryPageType.size)
    pt.instance_variable_set(:@topology, @topology)
    pt
  }
end