No, first of all, the parameter of malloc is unsigned, which limits the maximum value of the parameter, that is, the maximum value that can be applied. Generally, when malloc is designed, there is a maximum value of application.
There is also the word length limit of the processor at this stage, the memory is up to 4G, the virtual memory system maintained by the operating system, the maximum available memory of a process is 4G, all of the above indicate that malloc can not be unlimited use and unlimited memory application, and malloc is really used when dynamic memory application. malloc is usually used to apply for large objects, or your program may need to dynamically change the size of the space when it is running