summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--lib/system/alloc.nim2
-rw-r--r--lib/system/mm/malloc.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim
index ac1741ceb..edb094f33 100644
--- a/lib/system/alloc.nim
+++ b/lib/system/alloc.nim
@@ -1139,7 +1139,7 @@ template instantiateForRegion(allocator: untyped) {.dirty.} =
   proc realloc0Impl(p: pointer, oldSize, newSize: Natural): pointer =
     result = realloc(allocator, p, newSize)
     if newSize > oldSize:
-      zeroMem(cast[pointer](cast[int](result) + oldSize), newSize - oldSize)
+      zeroMem(cast[pointer](cast[uint](result) + uint(oldSize)), newSize - oldSize)
 
   when false:
     proc countFreeMem(): int =
diff --git a/lib/system/mm/malloc.nim b/lib/system/mm/malloc.nim
index d41dce705..b24b6f1e0 100644
--- a/lib/system/mm/malloc.nim
+++ b/lib/system/mm/malloc.nim
@@ -22,7 +22,7 @@ proc reallocImpl(p: pointer, newSize: Natural): pointer =
 proc realloc0Impl(p: pointer, oldsize, newSize: Natural): pointer =
   result = realloc(p, newSize.csize_t)
   if newSize > oldSize:
-    zeroMem(cast[pointer](cast[int](result) + oldSize), newSize - oldSize)
+    zeroMem(cast[pointer](cast[uint](result) + uint(oldSize)), newSize - oldSize)
 
 proc deallocImpl(p: pointer) =
   c_free(p)
adeff4747ab0e3031f75dd0'>^
d68181246 ^
b97a7dbf3 ^
01ab5948a ^

01ab5948a ^

0d68ef9f1 ^



9eb909baf ^
01ab5948a ^
869a5aa90 ^
f8fe86fcd ^
0d68ef9f1 ^
9eb909baf ^
3d4084208 ^

2f43fdb83 ^
73c6efdf6 ^
01ab5948a ^
46efaf294 ^
9eb909baf ^
86556ebfd ^
9eb909baf ^
46efaf294 ^
9eb909baf ^
86556ebfd ^
813828f69 ^
d68181246 ^
01ab5948a ^

0d68ef9f1 ^
769b56276 ^
01ab5948a ^
813828f69 ^


0d68ef9f1 ^
db95fad6f ^
813828f69 ^
db95fad6f ^
01ab5948a ^


86556ebfd ^
db95fad6f ^
01ab5948a ^



db95fad6f ^





091c1b307 ^
db95fad6f ^
813828f69 ^
01ab5948a ^
d68181246 ^
73c6efdf6 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81