ProgrammingMethodology

来源:互联网 发布:打开淘宝客户端 编辑:程序博客网 时间:2024/06/05 20:12

Lecture 14 Memroy(RAM)

bit

0 or 1

The bit (a portmanteau(mix) of binary digit(number)) is a basic unit of information used in computing and digital communications.

  • it can be used to express two state.

byte

8 bits

0~255
* it feels like something about download!

word(integer):

4 bytes

transfer

K Kilo 1024 bytes

M Meg 1024 K

G Gig 1024 M

Hexadecimal(16)

2B

  • Adress or Location for Memory
  • Static variables/constant and it`s special; used to refer them in the memory.
  • Dynamic variables for instance: Oval o = new Oval(); and its in the HEAP. (a place to store clothes) and when you don`t want to wear it, garbage collection works.
  • Local variables/parameters and it`s in the Stack

Memory Allocation

reference is in the stack
while the new Object() is in the heap

原创粉丝点击