Skip to content

LowSpaceWatcher not working for atomary too large allocation #139

@LinqLover

Description

@LinqLover

STR:

ulimit -v $((200*1024))
squeak trunk.image
Array new: 200*1024*1024

(by the way, OutOfMemory needs to be patched, not yet committed:

defaultAction
	LowSpaceWatcher signalLowSpace.

)

This gives an infinity loop because LowSpaceWatcher>>notifyMemoryHogs always answers true. This is because without our large allocation has failed, the watcher thinks we have plenty of free memory available, so the user is not notified. And Behavior>>#handleFailingFailingBasicNew: assumes that OutOfMemory will only be resumed after an interaction by the user.

So, how can we fix that? Should we teach the low space watcher about the newly requested amount of memory so it can subtract them from Smalltalk bytesLeft? Or do we need some other kind of recursion prevention?

Metadata

Metadata

Assignees

No one assigned

    Labels

    base system[SCOPE] Squeak's basic (language) concerns such as Kernel, Collections, Graphics, Networkbug[WHAT] Something isn't working as expected. Automated tests beneficial. :-

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions