File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
src/main/java/org/truffleruby/core/array Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ Bug fixes:
30
30
* Fixed the class of ` self ` and the wrapping ` Module ` for ` Kernel#load(path, wrap=true) ` (#1739 ).
31
31
* Fixed missing polyglot type declaration for ` RSTRING_PTR ` to help with native/managed interop.
32
32
* Fixed ` Module#to_s ` and ` Module#inspect ` to not return an extra ` #<Class: ` for singleton classes.
33
+ * Arrays backed by native storage now allocate the correct amount of memory (#1828 ).
33
34
34
35
Compatibility:
35
36
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ public static abstract class NativeArrayNewStoreNode extends ArrayOperationNodes
88
88
89
89
@ Specialization
90
90
protected NativeArrayStorage newStore (int size ) {
91
- Pointer pointer = Pointer .malloc (size );
91
+ Pointer pointer = Pointer .malloc (size * Pointer . SIZE );
92
92
pointer .enableAutorelease (getContext ().getFinalizationService ());
93
93
return new NativeArrayStorage (pointer , size );
94
94
}
You can’t perform that action at this time.
0 commit comments