mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 15:24:10 +02:00
Large collection fixes
This commit is contained in:
parent
e8880cd59c
commit
d0de4776f3
5 changed files with 25 additions and 10 deletions
|
@ -756,7 +756,7 @@ namespace System
|
|||
void Realloc(int newSize)
|
||||
{
|
||||
Debug.Assert(AllocSize > 0, "String has been frozen");
|
||||
Debug.Assert((uint)newSize <= cSizeFlags);
|
||||
Runtime.Assert((uint)newSize <= cSizeFlags);
|
||||
char8* newPtr = new:this char8[newSize]* (?);
|
||||
Internal.MemCpy(newPtr, Ptr, mLength);
|
||||
#if VALGRIND
|
||||
|
@ -776,8 +776,9 @@ namespace System
|
|||
|
||||
void Realloc(char8* newPtr, int newSize)
|
||||
{
|
||||
Runtime.Assert(newSize <= int_cosize.MaxValue);
|
||||
Debug.Assert(AllocSize > 0, "String has been frozen");
|
||||
Debug.Assert((uint)newSize <= cSizeFlags);
|
||||
Runtime.Assert((uint)newSize <= cSizeFlags);
|
||||
Internal.MemCpy(newPtr, Ptr, mLength);
|
||||
if (IsDynAlloc)
|
||||
delete:this mPtrOrBuffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue