code: def set_membind(nodemask):
      
      mask = set_to_numa_nodemask(nodemask)
  
      tmp = bitmask_t()
      tmp.maskp = cast(byref(mask), POINTER(c_ulong))
      tmp.size = sizeof(nodemask_t) * 8
  
      libnuma.numa_set_membind(byref(tmp))
docs: Sets the memory allocation mask.
  
      The thread will only allocate memory from the nodes set in nodemask.
  
      @param nodemask: node mask
      @type nodemask: C{set}