1/*
2 * drv_memory.c
3 *
4 * Copyright (C) 2009-2014 Aerospike, Inc.
5 *
6 * Portions may be licensed to Aerospike, Inc. under one or more contributor
7 * license agreements.
8 *
9 * This program is free software: you can redistribute it and/or modify it under
10 * the terms of the GNU Affero General Public License as published by the Free
11 * Software Foundation, either version 3 of the License, or (at your option) any
12 * later version.
13 *
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU Affero General Public License
20 * along with this program. If not, see http://www.gnu.org/licenses/
21 */
22
23//==========================================================
24// Includes.
25//
26
27#include "storage/storage.h"
28
29#include <stdint.h>
30
31#include "base/datamodel.h"
32#include "base/truncate.h"
33
34
35//==========================================================
36// Public API - storage API implementation.
37//
38
39void
40as_storage_namespace_init_memory(as_namespace *ns)
41{
42 as_truncate_done_startup(ns);
43}
44
45int
46as_storage_namespace_destroy_memory(as_namespace *ns)
47{
48 return 0;
49}
50
51int
52as_storage_stats_memory(as_namespace *ns, int *available_pct, uint64_t *used_disk_bytes)
53{
54 if (available_pct) {
55 *available_pct = 100;
56 }
57
58 if (used_disk_bytes) {
59 *used_disk_bytes = 0;
60 }
61
62 return 0;
63}
64