After browsing some of the code of Redis, I notice that the "robj" creation is done by calling "createObject" function, which in turn calls "malloc" to alloc memory. So whenever a request comes(e.g. SET uid 1234), there will be a memory allocation process.
My question is, why not pre-allocate the space to reduce memory allocation cost? because of different object size?