This commit is contained in:
Hongze Cheng 2022-02-07 03:38:22 +00:00
parent 34355a49e4
commit 218ab32666
1 changed files with 12 additions and 3 deletions

View File

@ -12,7 +12,6 @@
* You should have received a copy of the GNU Affero General Public License * You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "tdbInt.h" #include "tdbInt.h"
struct SPage { struct SPage {
@ -37,12 +36,22 @@ struct SPgCache {
}; };
int pgCacheCreate(SPgCache **ppPgCache) { int pgCacheCreate(SPgCache **ppPgCache) {
// TODO SPgCache *pPgCache;
pPgCache = (SPgCache *)calloc(1, sizeof(*pPgCache));
if (pPgCache == NULL) {
return -1;
}
*ppPgCache = pPgCache;
return 0; return 0;
} }
int pgCacheDestroy(SPgCache *pPgCache) { int pgCacheDestroy(SPgCache *pPgCache) {
// TODO if (pPgCache) {
free(pPgCache);
}
return 0; return 0;
} }