 From the point of view of a process, the "code space" is the part of its address space where the code in execution is stored.In multitasking systems this comprises the program's code segment and usually shared libraries.In multi-threading environment, different threads of one process share code space along with data space, which reduces the overhead of context switching considerably as compared to process switching.