Skip to content

Commit

Permalink
Extending permSpace when there is not enough place
Browse files Browse the repository at this point in the history
  • Loading branch information
tesonep committed Apr 5, 2022
1 parent 1870c61 commit 2255c07
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
4 changes: 3 additions & 1 deletion smalltalksrc/VMMaker/SpurMemoryManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -2496,7 +2496,9 @@ SpurMemoryManager >> allocateSlotsInPermSpace: numSlots bytes: totalBytes format
| chunk newOop |
permSpaceFreeStart + totalBytes > memoryMap permSpaceEnd
ifTrue: [ ^ nil ].
ifTrue: [
memoryMap extendPermObjectsSpace
ifFalse: [ ^ nil ] ].
chunk := permSpaceFreeStart.
permSpaceFreeStart := permSpaceFreeStart + totalBytes.
Expand Down
19 changes: 19 additions & 0 deletions smalltalksrc/VMMaker/VMMemoryMap.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,25 @@ VMMemoryMap >> doCheckMemoryMap [

]

{ #category : #allocating }
VMMemoryMap >> extendPermObjectsSpace [

| requestedSize extendedAddress |
requestedSize := 10 * 1024 * 1024.


extendedAddress := self
allocateMemory: requestedSize
BaseAddress: self permSpaceEnd.

extendedAddress ~= self permSpaceEnd
ifTrue: [ self logError: 'Could not extend perm space.'. ^ false ].

self permSpaceEnd: self permSpaceEnd + requestedSize.

^ true.
]

{ #category : #accessing }
VMMemoryMap >> initialCodeZoneSize [

Expand Down
7 changes: 7 additions & 0 deletions smalltalksrc/VMMaker/VMStructType.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,13 @@ VMStructType class >> typedef [
^String streamContents: [:s| self printTypedefOn: s]
]

{ #category : #'debug support' }
VMStructType >> logError: aMessage [

<doNotGenerate>
self logError: aMessage withArgs: #()
]

{ #category : #printing }
VMStructType >> printOn: aStream [
"A hook to allow subclasses to print their state if useful."
Expand Down

0 comments on commit 2255c07

Please sign in to comment.