Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetMem() should returns nil when Toro runs out of memory #204

Closed
MatiasVara opened this issue Jun 14, 2018 · 5 comments
Closed

GetMem() should returns nil when Toro runs out of memory #204

MatiasVara opened this issue Jun 14, 2018 · 5 comments
Assignees
Labels
bug This label identifies bugs. These items should be in Kanban.

Comments

@MatiasVara
Copy link
Collaborator

No description provided.

@MatiasVara MatiasVara self-assigned this Jun 14, 2018
@MatiasVara MatiasVara added the bug This label identifies bugs. These items should be in Kanban. label Jun 14, 2018
@MatiasVara
Copy link
Collaborator Author

MatiasVara commented Jun 14, 2018

Toro should continue working without free memory. Currently, it just panics when runs out of memory.

@MatiasVara
Copy link
Collaborator Author

This ticket can be split into two main task:

  1. To remove the Panic in Memory.pas
  2. To check that every call to GetMem() supports a nil return.

@MatiasVara
Copy link
Collaborator Author

Currently, I am working with BlockListExpand(). This function returns false if there is no more memory for expanding a list. This function is called when Capacity - Count = 1, which is just 1 element before the list is full.

@MatiasVara
Copy link
Collaborator Author

It is not clear yet if GetMem() should return nil or just raise an exception on the current thread.

@MatiasVara
Copy link
Collaborator Author

This must be only for kernel threads/interruption handlers. No interruption should be triggered in this case.

MatiasVara added a commit that referenced this issue Jun 24, 2018
MatiasVara added a commit that referenced this issue Jul 9, 2018
This commit fixes the following issues:
* Issue #208 and #204: Allow GetMem() to return nil and Panic() if list expansion fails
* Issue #210: Check always if ToroGetMem() returns nil
* Issue #212: Add TestGetMemNil.py to check if ToroGetMem returned nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label identifies bugs. These items should be in Kanban.
Projects
None yet
Development

No branches or pull requests

1 participant