Skip to content

Commit 566d22a

Browse files
authored
builtin: remove playground related code (the current playground uses a container/sandbox) (#24632)
1 parent ea25988 commit 566d22a

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

vlib/builtin/builtin.c.v

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ pub fn malloc(n isize) &u8 {
436436
C.fprintf(C.stderr, c'_v_malloc %6d total %10d\n', n, total_m)
437437
// print_backtrace()
438438
}
439-
vplayground_mlimit(n)
440439
if n < 0 {
441440
_memory_panic(@FN, n)
442441
} else if n == 0 {
@@ -474,7 +473,6 @@ pub fn malloc_noscan(n isize) &u8 {
474473
C.fprintf(C.stderr, c'malloc_noscan %6d total %10d\n', n, total_m)
475474
// print_backtrace()
476475
}
477-
vplayground_mlimit(n)
478476
if n < 0 {
479477
_memory_panic(@FN, n)
480478
}
@@ -526,7 +524,6 @@ pub fn malloc_uncollectable(n isize) &u8 {
526524
C.fprintf(C.stderr, c'malloc_uncollectable %6d total %10d\n', n, total_m)
527525
// print_backtrace()
528526
}
529-
vplayground_mlimit(n)
530527
if n < 0 {
531528
_memory_panic(@FN, n)
532529
}
@@ -657,7 +654,6 @@ pub fn vcalloc_noscan(n isize) &u8 {
657654
total_m += n
658655
C.fprintf(C.stderr, c'vcalloc_noscan %6d total %10d\n', n, total_m)
659656
}
660-
vplayground_mlimit(n)
661657
$if prealloc {
662658
return unsafe { prealloc_calloc(n) }
663659
} $else $if gcboehm ? {
@@ -829,13 +825,3 @@ pub fn arguments() []string {
829825
}
830826
return res
831827
}
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-
}

0 commit comments

Comments
 (0)