Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Referencing a built-in function allocates a variable for it #203

Closed
gfwilliams opened this issue Jan 28, 2014 · 1 comment
Closed

Referencing a built-in function allocates a variable for it #203

gfwilliams opened this issue Jan 28, 2014 · 1 comment

Comments

@gfwilliams
Copy link
Member

>trace()
#1[r1,l1] Object {
  #4[r1,l0] Name: '>timers'  #5[r2,l0] Array [
  ]
  #6[r1,l0] Name: '>watches'  #7[r2,l0] Array [
  ]
}
=undefined
>process.memory()
={"free":1987," ..........
>trace()         
#1[r1,l1] Object {
  #4[r1,l0] Name: '>timers'  #5[r2,l0] Array [
  ]
  #6[r1,l0] Name: '>watches'  #7[r2,l0] Array [
  ]
  #9[r1,l0] Name: '>history'  #10[r1,l0] Array [
    #11[r1,l0] Name: int 0  #8[r1,l0] String trace()
    #40[r1,l0] Name: int 1  #13[r1,l0] String process.memory()
  ]
  #15[r1,l0] Name: 'process'  #12[r1,l0] Function {
  }
}

We don't care about history, because that gets deleted if we run out of memory, but I doubt we actually need to add process to the symbol table - we just need to allocate it and get rid of it once .memory() is executed.

@gfwilliams
Copy link
Member Author

Closing this - built-in functions don't use memory now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant