parameters: (memory_share)
docstring: Limits the memory available to this process, to avoid OOM issues.
  
    Args:
      memory_share: (float) Share coefficient of the total physical memory that
                            the process can use.
docstring_summary: Limits the memory available to this process, to avoid OOM issues.
docstring_tokens: Limits the memory available to this process to avoid OOM issues .
function: def _LimitMemory(memory_share):
    """Limits the memory available to this process, to avoid OOM issues.
  
    Args:
      memory_share: (float) Share coefficient of the total physical memory that
                            the process can use.
    """
    total_memory = psutil.virtual_memory().total
    memory_limit = memory_share * total_memory
    resource.setrlimit(resource.RLIMIT_AS, (memory_limit, -1L))
function_tokens: def _LimitMemory ( memory_share ) : total_memory = psutil . virtual_memory ( ) . total memory_limit = memory_share * total_memory resource . setrlimit ( resource . RLIMIT_AS , ( memory_limit , - 1L ) )