Q:

How is malloc handled at compile time and run time?

Is malloc used to specify at compile time - a maximum size of a buffer(array) pointed to by a pointer and then allocated that max sized buffer by default in run-time and later - only that part of the buffer is actually used (though full size was allocated) that we need (by taking data from user etc) ?
If the above is true - then that means malloc (used along pointers) essentially provides a way to model a (including higher dimensions - but for eg -2) 2-D array as a 1-d array of pointers, and then at compile time specify the size of buffer to be allocated to each individual pointer i.e. essentially accomplishing the same thing as declaring it as a 2-D array with max dimensions specified in declaration at compile time - but just allowing to model/visualize it differently. Both are allocated the default max size - array type declaration at the the run of the declaration statement, while pointer+ malloc type at the run of the malloc statement (I do think this size information is used in both cases to calculate the size of stack+heap sum required for run).
That is in pointer+malloc, once compiler sees that this information (max buffer size for each pointer using malloc) is available at compile time - compilation can go through as it has the information of how much memory to allocate by default and can (and does) also use that information to calculate the size of stack+heap sum required for the function run (if no malloc - then it points to a single element). Later at run-time - the max sized buffer is allocated after malloc statement is run, to be later used as input needs.

A:

There is a reason why allocating memory using malloc, calloc and realloc is called dynamic memory management. Dynamic in this context means that which happens at run-time. This does not happen at compile time.  

If the above is true...  

Since it is not true, what follows is not derivable from it.

