l4-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: currency based virtual memory


From: Neal H. Walfield
Subject: Re: currency based virtual memory
Date: 07 Nov 2002 10:49:09 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2

> And it's all about the physical memory, space on the swap should be free, or 
> at
> least a lot cheaper than physical memory.

Agreed.  But consider the following:

  memory_handle_t handle;
  void *addr;
  int i;

  handle = memory_allocate (PAGE_SIZE, 1 /* count */, 0 /* flags */);
  addr = vm_map (handle);
  for (i = 0; ; i ++)
    {
      * (int *) addr = i;
      vm_swap (handle);
      memory_release_data (handle);
    }

Which is to say, we just flooded the swap space with a few billion
pages while only having allocated one.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]