C++ on final - no vtables - how they work class with virtual functions begin with a pointer to a vtable vtable stract/array of function pointers writing asm on final - good idea! struct ptr, memcpy something else to that struct; cast? -- not needed (void *) OH next week - probably do you need to know which register to save no (ish; do know rax rsp) but if I tell you which ones are what, you should be able to do it if you don't initialize, what's the default? undefined examples of memory errors - see http://www.cs.virginia.edu/luther/COA1/F2019/memory.html is adjacent memory faster than scattered memory? - Yes should I write my own malloc? - probably not profile - optimize the slow bits practice Q2 - overflow? unitialized? do I have to use %rbp in the C calling convention no if you optimize -O2 or more, it will usually not be used How does malloc work uses an OS call to get memory has a DS to store used and unused bytes address of the next never-used byte free list block size for every allocated block which C functions to know? printf puts malloc read write stderr 0 input 1 output normal output 2 output error how should I study? in a group early study beyond Coming courses Spring: COA2 + 2102 Fall (guess): 4810 + 2102 What logic gates will we make small enought to fit on a page not be one you already did