Beispiel #1
0
 def fn():
     s = lltype.malloc(S)
     s.u = lltype.malloc(U)
     s.u.next = lltype.malloc(U)
     s.u.next.next = lltype.malloc(U)
     a = lltype.malloc(A, 1000)
     s2 = lltype.malloc(S)
     #
     fd1 = os.open(filename1, os.O_WRONLY | os.O_CREAT, 0666)
     fd2 = os.open(filename2, os.O_WRONLY | os.O_CREAT, 0666)
     rgc.dump_rpy_heap(fd1)
     rgc.dump_rpy_heap(fd2)      # try twice in a row
     keepalive_until_here(s2)
     keepalive_until_here(s)
     keepalive_until_here(a)
     os.close(fd1)
     os.close(fd2)
     return 0
Beispiel #2
0
 def fn():
     s = lltype.malloc(S)
     s.u = lltype.malloc(U)
     s.u.next = lltype.malloc(U)
     s.u.next.next = lltype.malloc(U)
     a = lltype.malloc(A, 1000)
     s2 = lltype.malloc(S)
     #
     fd1 = os.open(filename1, os.O_WRONLY | os.O_CREAT, 0666)
     fd2 = os.open(filename2, os.O_WRONLY | os.O_CREAT, 0666)
     rgc.dump_rpy_heap(fd1)
     rgc.dump_rpy_heap(fd2)      # try twice in a row
     keepalive_until_here(s2)
     keepalive_until_here(s)
     keepalive_until_here(a)
     os.close(fd1)
     os.close(fd2)
     return 0
Beispiel #3
0
def _dump_rpy_heap(space, fd):
    try:
        ok = rgc.dump_rpy_heap(fd)
    except OSError, e:
        raise wrap_oserror(space, e)