The full BACstac source code contains over 100 kLOC (thousands of lines of code == statements excluding comments and blanks) including the BACnet objects & services, segmentation, a full routing network layer, and several data link layers.
However, the vast majority of functions are highly modular and can be conditionally included into a build at compile time. Our target design should enable the creation of a supervisory building controller (including the B-BC device profile) on a 32-bit processor platform with the real-time kernel supporting tasks/threads and 4+M RAM and Flash.
An application specific controller (supporting the B-ASC device profile) would typically use 2Mbyte RAM and Flash.