If you just need the current stack size, you can declare a variable at the top of main (), take its address and compare it with the address of the variable declared where you define "current". The difference should be the approximate size that the stack has grown.
, , /proc/ [pid]/maps, , [stack]. , atd- :
7fff72a41000-7fff72a56000 rw-p 00000000 00:00 0 [stack]
0175b000-0177c000 rw-p 00000000 00:00 0 [heap]
.
, , , , . , - :)
1) , main(), alloca() , 0xDEADBEEF - , . "", .
2) main alloca(), "" , ( 64 -, , , ), , .
, , !