When I read a source about the processes and threads in the operating system, I faced this sentence and it sounded weird to me: 

`When a program is executed and handled by the processor, it converts into a process. A process needs to use the data and code segment in the memory.`

I think the first sentence is true naturally. However, I cannot understand why the process needs to use solely data and code segment? 

```
#include <stdio.h>
x = 10;
y;

int main(void){

   int *array = (int*)malloc(sizeof(int) * 4);
   printf("x and y are %d %d", x, y);

   return 0;
}

```

I think that when this code is executed, the generated process use bss, data, heap and code segment. In my opinion, a process can benefit from any segment of the memory.

If my thoughts are wrong, can anyone explain the reason ?