You can find out just how big your code really is by looking at the HEX file. The first two HEX digits gives the number of bytes in the line. This will usually be "10" (16 bytes). Digits 3,4,5 & 6 give the load address of the first byte on that line. Scroll down to the bottom of the HEX file, and see what the last address is. Compare that with the memory map of the device and you will always know where you stand - at least when it comes to filling up the device.