fix parse meminfo error

Test:run vts -m VtsKernelProcFileApi -t VtsKernelProcFileApi#testProcMemInfoTest

Bug: 167155158
Bug: 168772303

This bug was caused by upgrade of parse library:
parse 1.17.0  Released: Aug 29, 2020
1.17.0 Make left- and center-aligned search consume up to next space

Signed-off-by: duanyangqi <>
Change-Id: I7fca1e3a017db9535c9c5299544f3a4db72c71c2
(cherry picked from commit 69edf5391d23b8c9cf58e990957e49a5ae296205)
(cherry picked from commit bcdc459ae09f32b2a942111705f13ecacdc6403b)
(cherry picked from commit 278ac87b8815057beaab6a25d8d61dbda152c66e)
diff --git a/api/proc/ b/api/proc/
index 1b4652f..b1068b2 100644
--- a/api/proc/
+++ b/api/proc/
@@ -28,7 +28,7 @@
 def token_lu(text):
     return int(text)
+@with_pattern(r'[ ]*(kB)?')
 def token_kb(text):
     return text
@@ -79,7 +79,7 @@
         lines = contents.split('\n')
         if lines[-1] != '':
             raise SyntaxError("missing final newline")
-        return [self.parse_line("{:name}: {:lu}{:^kb}", line,
+        return [self.parse_line("{:name}: {:lu}{:kb}", line,
             dict(name=token_name, lu=token_lu, kb=token_kb)) for line in lines[:-1]]
     def result_correct(self, parse_result):