aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2013-08-22 03:45:33 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-08-22 03:45:33 -0700
commit9e1bd9bbc2d886c36c71c0a9abbf554b934b9b63 (patch)
treed57830595c0f4d666725887a7b72554a9cc4e070 /native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp
parent740bf03549e565d69ac90073133b30dcc0a76e91 (diff)
parent5f438d555c8553e4814abc6c0263c8c8f84a8220 (diff)
downloadlatinime-9e1bd9bbc2d886c36c71c0a9abbf554b934b9b63.tar.gz
latinime-9e1bd9bbc2d886c36c71c0a9abbf554b934b9b63.tar.xz
latinime-9e1bd9bbc2d886c36c71c0a9abbf554b934b9b63.zip
am 5f438d55: Merge "Introduce ExtendableBuffer for dynamic update."
* commit '5f438d555c8553e4814abc6c0263c8c8f84a8220': Introduce ExtendableBuffer for dynamic update.
Diffstat (limited to 'native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp')
-rw-r--r--native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp b/native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp
new file mode 100644
index 000000000..e55cc2410
--- /dev/null
+++ b/native/jni/src/suggest/policyimpl/dictionary/utils/extendable_buffer.cpp
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2013 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "suggest/policyimpl/dictionary/utils/extendable_buffer.h"
+
+namespace latinime {
+
+const size_t ExtendableBuffer::INITIAL_BUFFER_SIZE = 16 * 1024;
+const size_t ExtendableBuffer::MAX_BUFFER_SIZE = 1024 * 1024;
+const size_t ExtendableBuffer::EXTEND_BUFFER_SIZE_STEP = 16 * 1024;
+
+}