复制int processCommand(redisClient *c) { ...... /* Handle the maxmemory directive. * * First we try tofreesome memory if possible (if there are volatile * keys in the dataset). If there are not the only thing we can do * is returning an error. */ if (server.maxmemory) { int retval = freeMemoryIfNeeded(); if ((c->cmd->flags & REDIS_CMD_DENYOOM) && retval == REDIS_ERR) { flagTransaction(c); addReply(c,阅读s源 shared.oomerr); return REDIS_OK; } } ...... } 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.