]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/contrib/byterun/alloc.h
update
[l4.git] / l4 / pkg / ocaml / contrib / byterun / alloc.h
1 /***********************************************************************/
2 /*                                                                     */
3 /*                           Objective Caml                            */
4 /*                                                                     */
5 /*         Xavier Leroy and Damien Doligez, INRIA Rocquencourt         */
6 /*                                                                     */
7 /*  Copyright 1996 Institut National de Recherche en Informatique et   */
8 /*  en Automatique.  All rights reserved.  This file is distributed    */
9 /*  under the terms of the GNU Library General Public License, with    */
10 /*  the special exception on linking described in file ../LICENSE.     */
11 /*                                                                     */
12 /***********************************************************************/
13
14 /* $Id: alloc.h 7064 2005-09-22 14:21:50Z xleroy $ */
15
16 #ifndef CAML_ALLOC_H
17 #define CAML_ALLOC_H
18
19
20 #ifndef CAML_NAME_SPACE
21 #include "compatibility.h"
22 #endif
23 #include "misc.h"
24 #include "mlvalues.h"
25
26 CAMLextern value caml_alloc (mlsize_t, tag_t);
27 CAMLextern value caml_alloc_small (mlsize_t, tag_t);
28 CAMLextern value caml_alloc_tuple (mlsize_t);
29 CAMLextern value caml_alloc_string (mlsize_t);  /* size in bytes */
30 CAMLextern value caml_copy_string (char const *);
31 CAMLextern value caml_copy_string_array (char const **);
32 CAMLextern value caml_copy_double (double);
33 CAMLextern value caml_copy_int32 (int32);       /* defined in [ints.c] */
34 CAMLextern value caml_copy_int64 (int64);       /* defined in [ints.c] */
35 CAMLextern value caml_copy_nativeint (intnat);  /* defined in [ints.c] */
36 CAMLextern value caml_alloc_array (value (*funct) (char const *),
37                                    char const ** array);
38
39 typedef void (*final_fun)(value);
40 CAMLextern value caml_alloc_final (mlsize_t, /*size in words*/
41                                    final_fun, /*finalization function*/
42                                    mlsize_t, /*resources consumed*/
43                                    mlsize_t  /*max resources*/);
44
45 CAMLextern int caml_convert_flag_list (value, int *);
46
47 #endif /* CAML_ALLOC_H */