File tree Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Expand file tree Collapse file tree 1 file changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,6 @@ pub fn malloc(n isize) &u8 {
436
436
C.fprintf (C.stderr, c '_v_malloc %6d total %10d\n ' , n, total_m)
437
437
// print_backtrace()
438
438
}
439
- vplayground_mlimit (n)
440
439
if n < 0 {
441
440
_memory_panic (@FN, n)
442
441
} else if n == 0 {
@@ -474,7 +473,6 @@ pub fn malloc_noscan(n isize) &u8 {
474
473
C.fprintf (C.stderr, c 'malloc_noscan %6d total %10d\n ' , n, total_m)
475
474
// print_backtrace()
476
475
}
477
- vplayground_mlimit (n)
478
476
if n < 0 {
479
477
_memory_panic (@FN, n)
480
478
}
@@ -526,7 +524,6 @@ pub fn malloc_uncollectable(n isize) &u8 {
526
524
C.fprintf (C.stderr, c 'malloc_uncollectable %6d total %10d\n ' , n, total_m)
527
525
// print_backtrace()
528
526
}
529
- vplayground_mlimit (n)
530
527
if n < 0 {
531
528
_memory_panic (@FN, n)
532
529
}
@@ -657,7 +654,6 @@ pub fn vcalloc_noscan(n isize) &u8 {
657
654
total_m + = n
658
655
C.fprintf (C.stderr, c 'vcalloc_noscan %6d total %10d\n ' , n, total_m)
659
656
}
660
- vplayground_mlimit (n)
661
657
$if prealloc {
662
658
return unsafe { prealloc_calloc (n) }
663
659
} $else $if gcboehm ? {
@@ -829,13 +825,3 @@ pub fn arguments() []string {
829
825
}
830
826
return res
831
827
}
832
-
833
- @[if vplayground ? ]
834
- fn vplayground_mlimit (n isize) {
835
- if n > 10000 {
836
- panic ('allocating more than 10 KB at once is not allowed in the V playground' )
837
- }
838
- if total_m > 50 * 1024 * 1024 {
839
- panic ('allocating more than 50 MB is not allowed in the V playground' )
840
- }
841
- }
You can’t perform that action at this time.
0 commit comments