~clint-fewbar/ubuntu/precise/erlang/merge-15b

« back to all changes in this revision

Viewing changes to erts/emulator/beam/erl_afit_alloc.c

  • Committer: Package Import Robot
  • Author(s): Sergei Golovan
  • Date: 2011-12-15 19:20:10 UTC
  • mfrom: (1.1.18) (3.5.15 sid)
  • mto: (3.5.16 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: package-import@ubuntu.com-20111215192010-jnxcfe3tbrpp0big
Tags: 1:15.b-dfsg-1
* New upstream release.
* Upload to experimental because this release breaks external drivers
  API along with ABI, so several applications are to be fixed.
* Removed SSL patch because the old SSL implementation is removed from
  the upstream distribution.
* Removed never used patch which added native code to erlang beam files.
* Removed the erlang-docbuilder binary package because the docbuilder
  application was dropped by upstream.
* Documented dropping ${erlang-docbuilder:Depends} substvar in
  erlang-depends(1) manpage.
* Made erlang-base and erlang-base-hipe provide virtual package
  erlang-abi-15.b (the number means the first erlang version, which
  provides current ABI).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * %CopyrightBegin%
3
3
 * 
4
 
 * Copyright Ericsson AB 2003-2009. All Rights Reserved.
 
4
 * Copyright Ericsson AB 2003-2011. All Rights Reserved.
5
5
 * 
6
6
 * The contents of this file are subject to the Erlang Public License,
7
7
 * Version 1.1, (the "License"); you may not use this file except in
43
43
 
44
44
/* Prototypes of callback functions */
45
45
static Block_t *        get_free_block          (Allctr_t *, Uint,
46
 
                                                 Block_t *, Uint);
47
 
static void             link_free_block         (Allctr_t *, Block_t *);
48
 
static void             unlink_free_block       (Allctr_t *, Block_t *);
 
46
                                                 Block_t *, Uint, Uint32);
 
47
static void             link_free_block         (Allctr_t *, Block_t *, Uint32);
 
48
static void             unlink_free_block       (Allctr_t *, Block_t *, Uint32);
49
49
 
50
50
 
51
51
static Eterm            info_options            (Allctr_t *, char *, int *,
65
65
                 AFAllctrInit_t *afinit,
66
66
                 AllctrInit_t *init)
67
67
{
68
 
    AFAllctr_t nulled_state = {{0}};
69
 
    /* {{0}} is used instead of {0}, in order to avoid (an incorrect) gcc
70
 
       warning. gcc warns if {0} is used as initializer of a struct when
71
 
       the first member is a struct (not if, for example, the third member
72
 
       is a struct). */
 
68
    struct {
 
69
        int dummy;
 
70
        AFAllctr_t allctr;
 
71
    } zero = {0};
 
72
    /* The struct with a dummy element first is used in order to avoid (an
 
73
       incorrect) gcc warning. gcc warns if {0} is used as initializer of
 
74
       a struct when the first member is a struct (not if, for example,
 
75
       the third member is a struct). */
 
76
 
73
77
    Allctr_t *allctr = (Allctr_t *) afallctr;
74
78
 
75
 
    sys_memcpy((void *) afallctr, (void *) &nulled_state, sizeof(AFAllctr_t));
 
79
    sys_memcpy((void *) afallctr, (void *) &zero.allctr, sizeof(AFAllctr_t));
 
80
 
 
81
    init->sbmbct = 0; /* Small mbc not supported by afit */
76
82
 
77
83
    allctr->mbc_header_size             = sizeof(Carrier_t);
78
84
    allctr->min_mbc_size                = MIN_MBC_SZ;
105
111
}
106
112
 
107
113
static Block_t *
108
 
get_free_block(Allctr_t *allctr, Uint size, Block_t *cand_blk, Uint cand_size)
 
114
get_free_block(Allctr_t *allctr, Uint size, Block_t *cand_blk, Uint cand_size,
 
115
               Uint32 flags)
109
116
{
110
117
    AFAllctr_t *afallctr = (AFAllctr_t *) allctr;
111
118
 
123
130
}
124
131
 
125
132
static void
126
 
link_free_block(Allctr_t *allctr, Block_t *block)
 
133
link_free_block(Allctr_t *allctr, Block_t *block, Uint32 flags)
127
134
{
128
135
    AFFreeBlock_t *blk = (AFFreeBlock_t *) block;
129
136
    AFAllctr_t *afallctr = (AFAllctr_t *) allctr;
144
151
}
145
152
 
146
153
static void
147
 
unlink_free_block(Allctr_t *allctr, Block_t *block)
 
154
unlink_free_block(Allctr_t *allctr, Block_t *block, Uint32 flags)
148
155
{
149
156
    AFFreeBlock_t *blk = (AFFreeBlock_t *) block;
150
157
    AFAllctr_t *afallctr = (AFAllctr_t *) allctr;