]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/byte_arrays.hpp
Fix FEP if there are too many words in the image, clean up some VM code
[factor.git] / vm / byte_arrays.hpp
old mode 100644 (file)
new mode 100755 (executable)
index ebdc6be..6de8ee4
@@ -7,12 +7,11 @@ PRIMITIVE(byte_array);
 PRIMITIVE(uninitialized_byte_array);
 PRIMITIVE(resize_byte_array);
 
-/* Macros to simulate a byte vector in C */
 struct growable_byte_array {
        cell count;
        gc_root<byte_array> elements;
 
-       growable_byte_array() : count(0), elements(allot_byte_array(2)) { }
+       growable_byte_array(cell capacity = 40) : count(0), elements(allot_byte_array(capacity)) { }
 
        void append_bytes(void *elts, cell len);
        void append_byte_array(cell elts);