On Wed 08 Apr 2009 at 11:50AM, Danek Duvall wrote:
> I don't know that we'll run into this much with Bart's recent changes, but
> I'm sure we'll bulk things up again at some point, and I'm sure people will
> still try to run pkg in ridiculously low memory environments, so it'll
> still be useful.
> 
>     http://cr.opensolaris.org/~dduvall/pkg-memoryerror/
> 
> It's organized so that it can be called from the GUI as well, but I had no
> idea where that should be hooked in, I've only done so for the CLI.

      568 +                psinfo_arr = file("/proc/%d/psinfo" %
      os.getpid()).read(232)

      
Use /proc/self/psinfo for simplicity.

What happens if we ever uyse 64-bit python?  How brittle is this
going to be?  When we discussed this, I think I suggested either:

        - Call sbrk(0)
        - Write a native routine which does the /proc stuff.


Messaging:

      581 +        if vsz is not None:
      582 +                error = """\
      583 +There is not enough memory to complete the requested operation.  At 
least
      584 +%(vsz)s of virtual memory was in use by this command before it ran 
out of memory.
      585 +You must add more memory (swap or physical) or allow the system to 
access more
      586 +existing memory, or quit other programs that may be consuming 
memory, and re-run
      587 +the command."""

Please scale the amount of memory into something other than bytes,
and also indicate the units.  A written this will say:

At least 2343451 of virtual memory was in use by ...

        -dp

-- 
Daniel Price, Solaris Kernel Engineering    http://blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to