Home
last modified time | relevance | path

Searched refs:alloc (Results 1 – 25 of 84) sorted by relevance

1234

/AliOS-Things-master/components/py_engine/engine/py/
A Dmap.c70 map->alloc = 0; in mp_map_init()
73 map->alloc = n; in mp_map_init()
83 map->alloc = n; in mp_map_init_fixed_table()
103 map->alloc = 0; in mp_map_clear()
117 map->alloc = new_alloc; in mp_map_rehash()
184 map->alloc += 4; in mp_map_lookup()
201 if (map->alloc == 0) { in mp_map_lookup()
294 set->alloc = n; in mp_set_init()
302 set->alloc = get_hash_alloc_greater_or_equal_to(set->alloc + 1); in mp_set_rehash()
317 if (set->alloc == 0) { in mp_set_lookup()
[all …]
A Dvstr.c42 if (alloc < 1) { in vstr_init()
43 alloc = 1; in vstr_init()
45 vstr->alloc = alloc; in vstr_init()
59 vstr->alloc = alloc; in vstr_init_fixed_buf()
66 vstr_init(vstr, alloc); in vstr_init_print()
78 vstr_t *vstr_new(size_t alloc) { in vstr_new() argument
80 vstr_init(vstr, alloc); in vstr_new()
100 char *new_buf = m_renew(char, vstr->buf, vstr->alloc, vstr->alloc + size); in vstr_extend()
102 vstr->alloc += size; in vstr_extend()
116 vstr->alloc = new_alloc; in vstr_ensure_extra()
[all …]
A Dobjdeque.c37 size_t alloc; member
62 o->alloc = maxlen + 1; in deque_make_new()
64 o->items = m_new0(mp_obj_t, o->alloc); in deque_make_new()
81 len += self->alloc; in deque_unary_op()
87 size_t sz = sizeof(*self) + sizeof(mp_obj_t) * self->alloc; in deque_unary_op()
100 if (new_i_put == self->alloc) { in mp_obj_deque_append()
112 if (++self->i_get == self->alloc) { in mp_obj_deque_append()
131 if (++self->i_get == self->alloc) { in deque_popleft()
143 mp_seq_clear(self->items, 0, self->alloc, sizeof(*self->items));
A Dobjlist.c217 self->alloc = self->len + len_adj; in list_subscr()
244 if (self->len >= self->alloc) { in mp_obj_list_append()
245 self->items = m_renew(mp_obj_t, self->items, self->alloc, self->alloc * 2); in mp_obj_list_append()
246 self->alloc *= 2; in mp_obj_list_append()
259 if (self->len + arg->len > self->alloc) { in list_extend()
262 self->alloc = self->len + arg->len + 4; in list_extend()
286 if (self->alloc > LIST_MIN_ALLOC && self->alloc > 2 * self->len) { in list_pop()
287 self->items = m_renew(mp_obj_t, self->items, self->alloc, self->alloc / 2); in list_pop()
288 self->alloc /= 2; in list_pop()
356 self->alloc = LIST_MIN_ALLOC; in list_clear()
[all …]
A Dmodio.c116 size_t alloc; member
123 size_t alloc = mp_obj_get_int(args[1]); in bufwriter_make_new() local
124 mp_obj_bufwriter_t *o = m_new_obj_var(mp_obj_bufwriter_t, byte, alloc); in bufwriter_make_new()
127 o->alloc = alloc; in bufwriter_make_new()
138 mp_uint_t rem = self->alloc - self->len; in bufwriter_write()
154 mp_uint_t out_sz = mp_stream_write_exactly(self->stream, self->buf, self->alloc, errcode); in bufwriter_write()
161 assert(out_sz == self->alloc); in bufwriter_write()
A Dmisc.h166 size_t alloc; member
173 #define VSTR_FIXED(vstr, alloc) vstr_t vstr; char vstr##_buf[(alloc)]; vstr_init_fixed_buf(&vstr, ( argument
175 void vstr_init(vstr_t *vstr, size_t alloc);
177 void vstr_init_fixed_buf(vstr_t *vstr, size_t alloc, char *buf);
179 void vstr_init_print(vstr_t *vstr, size_t alloc, struct _mp_print_t *print);
181 vstr_t *vstr_new(size_t alloc);
A Dobjtuple.c87 size_t alloc = 4; in mp_obj_tuple_make_new() local
89 mp_obj_t *items = m_new(mp_obj_t, alloc); in mp_obj_tuple_make_new()
94 if (len >= alloc) { in mp_obj_tuple_make_new()
95 items = m_renew(mp_obj_t, items, alloc, alloc * 2); in mp_obj_tuple_make_new()
96 alloc *= 2; in mp_obj_tuple_make_new()
102 m_del(mp_obj_t, items, alloc); in mp_obj_tuple_make_new()
A Dparse.c218 size_t alloc; member
261 sizeof(mp_parse_chunk_t) + chunk->alloc, in parser_alloc()
267 chunk->alloc = chunk->union_.used; in parser_alloc()
273 chunk->alloc += num_bytes; in parser_alloc()
279 size_t alloc = MICROPY_ALLOC_PARSE_CHUNK_INIT; in parser_alloc() local
280 if (alloc < num_bytes) { in parser_alloc()
281 alloc = num_bytes; in parser_alloc()
284 chunk->alloc = alloc; in parser_alloc()
1135 sizeof(mp_parse_chunk_t) + parser.cur_chunk->alloc, in mp_parse()
1138 parser.cur_chunk->alloc = parser.cur_chunk->union_.used; in mp_parse()
[all …]
A Dqstr.c148 if (MP_STATE_VM(last_pool)->len >= MP_STATE_VM(last_pool)->alloc) { in qstr_add()
149 size_t new_alloc = MP_STATE_VM(last_pool)->alloc * 2; in qstr_add()
161 pool->alloc = new_alloc; in qstr_add()
164 DEBUG_printf("QSTR: allocate new pool of size %d\n", MP_STATE_VM(last_pool)->alloc); in qstr_add()
295 *n_total_bytes += sizeof(qstr_pool_t) + sizeof(qstr) * pool->alloc; in qstr_pool_info()
A Dobjexcept.c430 size_t alloc; member
437 if (pr->len + len >= pr->alloc) { in exc_add_strn()
440 size_t new_alloc = pr->alloc + len + 16; in exc_add_strn()
441 byte *new_buf = m_renew_maybe(byte, pr->buf, pr->alloc, new_alloc, true); in exc_add_strn()
444 len = pr->alloc - pr->len - 1; in exc_add_strn()
446 pr->alloc = new_alloc; in exc_add_strn()
450 len = pr->alloc - pr->len - 1; in exc_add_strn()
A Dobjset.c85 for (size_t i = 0; i < self->set.alloc; i++) { in set_print()
132 size_t max = self->set->set.alloc; in set_it_iternext()
179 mp_set_init(&other->set, self->set.alloc); in set_copy()
181 memcpy(other->set.table, self->set.table, self->set.alloc * sizeof(mp_obj_t)); in set_copy()
254 m_del(mp_obj_t, self->set.table, self->set.alloc); in set_intersect_int()
255 self->set.alloc = out->set.alloc; in set_intersect_int()
438 size_t max = self->set.alloc; in set_unary_op()
A Dobjstringio.c94 if (new_pos > o->vstr->alloc) { in stringio_write()
96 o->vstr->len = o->vstr->alloc; in stringio_write()
98 vstr_add_len(o->vstr, new_pos - o->vstr->alloc); in stringio_write()
152 o->vstr->alloc = 0; in stringio_ioctl()
A Dbuiltinhelp.c60 for (size_t i = 0; i < map->alloc; i++) { in mp_help_add_from_map()
156 for (uint i = 0; i < map->alloc; i++) { in mp_help_print_obj()
/AliOS-Things-master/components/py_engine/engine/extmod/nimble/nimble/
A Dnimble_npl_os.c73 alloc->size = size; in m_malloc_bluetooth()
75 if (alloc->next) { in m_malloc_bluetooth()
76 alloc->next->prev = alloc; in m_malloc_bluetooth()
79 return alloc->data; in m_malloc_bluetooth()
88 if (alloc->next) { in m_free_bluetooth()
89 alloc->next->prev = alloc->prev; in m_free_bluetooth()
91 if (alloc->prev) { in m_free_bluetooth()
92 alloc->prev->next = alloc->next; in m_free_bluetooth()
96 m_free(alloc in m_free_bluetooth()
108 while (alloc) { in is_valid_nimble_malloc()
[all …]
/AliOS-Things-master/components/littlevgl/src/lv_misc/
A Dlv_mem.c127 void * alloc = NULL; in lv_mem_alloc() local
140 alloc = ent_alloc(e, size); in lv_mem_alloc()
143 } while(e != NULL && alloc == NULL); in lv_mem_alloc()
148 alloc = LV_MEM_CUSTOM_ALLOC(size); in lv_mem_alloc()
152 if(alloc != NULL) { in lv_mem_alloc()
156 alloc = &((lv_mem_ent_t *)alloc)->first_data; in lv_mem_alloc()
162 if(alloc != NULL) memset(alloc, 0xaa, size); in lv_mem_alloc()
167 return alloc; in lv_mem_alloc()
410 void * alloc = NULL; in ent_alloc() local
420 alloc = &e->first_data; in ent_alloc()
[all …]
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/soc/realtek/amebad/misc/
A Drtl8721d_ota.c529 u8 * alloc; in download_new_fw_from_server() local
551 buf = alloc; in download_new_fw_from_server()
799 if(!alloc){
882 if(alloc)
1301 u8 * alloc;
1503 if(!alloc){
1568 _memcpy(alloc, alloc+rsp_result.header_len, writelen);
1618 if(alloc)
1767 u8 * alloc;
1965 if(!alloc){
[all …]
/AliOS-Things-master/components/py_engine/engine/extmod/
A Dmodutimeq.c51 mp_uint_t alloc; member
79 mp_uint_t alloc = mp_obj_get_int(args[0]); in utimeq_make_new() local
80 mp_obj_utimeq_t *o = m_new_obj_var(mp_obj_utimeq_t, struct qentry, alloc); in utimeq_make_new()
82 memset(o->items, 0, sizeof(*o->items) * alloc); in utimeq_make_new()
83 o->alloc = alloc; in utimeq_make_new()
128 if (heap->len == heap->alloc) { in mod_utimeq_heappush()
/AliOS-Things-master/components/SDL2/test/
A Dtestnativecocoa.m24 pool = [[NSAutoreleasePool alloc] init];
34 …nswindow = [[NSWindow alloc] initWithContentRect:rect styleMask:style backing:NSBackingStoreBuffer…
44 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
/AliOS-Things-master/components/mbedtls/library/
A Dmemory_buffer_alloc.c55 size_t alloc; member
100 hdr->alloc, hdr->size ); in debug_header()
152 if( hdr->alloc > 1 ) in verify_header()
270 if( cur->alloc != 0 ) in buffer_alloc_calloc()
288 cur->alloc = 1; in buffer_alloc_calloc()
327 new->alloc = 0; in buffer_alloc_calloc()
352 cur->alloc = 1; in buffer_alloc_calloc()
404 if( hdr->alloc != 1 ) in buffer_alloc_free()
413 hdr->alloc = 0; in buffer_alloc_free()
428 if( hdr->prev != NULL && hdr->prev->alloc == 0 ) in buffer_alloc_free()
[all …]
/AliOS-Things-master/components/SDL2/src/image/external/libpng-1.6.37/projects/visualc71/
A DPRJ0041.mak4 all: $(IntDir)\alloc.h \
13 $(IntDir)\alloc.h \
/AliOS-Things-master/components/ai_agent/src/engine/tflite-micro/tensorflow/lite/
A Dsimple_memory_arena.h79 const ArenaAllocWithUsageInterval& alloc);
91 const ArenaAllocWithUsageInterval& alloc,
/AliOS-Things-master/components/freetype/src/base/
A Dftdbgmem.c135 FT_Alloc_Func alloc; member
234 block = table->alloc( memory, size ); in ft_mem_table_alloc()
310 table = (FT_MemTable)memory->alloc( memory, sizeof ( *table ) ); in ft_mem_table_new()
323 table->alloc = memory->alloc; in ft_mem_table_new()
328 memory->alloc( memory, in ft_mem_table_new()
834 memory->alloc = ft_mem_debug_alloc; in ft_mem_debug_init()
891 memory->alloc = table->alloc; in ft_mem_debug_done()
/AliOS-Things-master/components/SDL2/src/image/Xcode/showimage/
A DSDLMain.m136 appleMenu = [[NSMenu alloc] initWithTitle:@""];
159 menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
178 windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
181 …menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) key…
186 windowMenuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
201 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
219 [NSApp setMainMenu:[[NSMenu alloc] init]];
224 sdlMain = [[SDLMain alloc] init];
/AliOS-Things-master/components/ble_host/bt_host/port/core/
A Dbuf.c154 struct k_mem_pool *pool = buf_pool->alloc->alloc_data; in mem_pool_data_alloc()
195 .alloc = mem_pool_data_alloc,
204 const struct net_buf_pool_fixed *fixed = pool->alloc->alloc_data; in fixed_data_alloc()
244 .alloc = fixed_data_alloc,
278 .alloc = heap_data_alloc,
293 return pool->alloc->cb->alloc(buf, size, timeout); in data_alloc()
300 return pool->alloc->cb->ref(buf, data); in data_ref()
311 pool->alloc->cb->unref(buf, data); in data_unref()
440 const struct net_buf_pool_fixed *fixed = pool->alloc->alloc_data; in net_buf_alloc_fixed_debug()
449 const struct net_buf_pool_fixed *fixed = pool->alloc->alloc_data; in net_buf_alloc_fixed()
[all …]
/AliOS-Things-master/components/SDL2/src/video/cocoa/
A DSDL_cocoaevents.m98 NSDictionary *appDefaults = [[NSDictionary alloc] initWithObjectsAndKeys:
337 mainMenu = [[NSMenu alloc] init];
347 appleMenu = [[NSMenu alloc] initWithTitle:@""];
359 serviceMenu = [[NSMenu alloc] initWithTitle:@""];
382 menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
393 windowMenu = [[NSMenu alloc] initWithTitle:@"Window"];
407 …menuItem = [[NSMenuItem alloc] initWithTitle:@"Toggle Full Screen" action:@selector(toggleFullScre…
414 menuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""];
461 appDelegate = [[SDLAppDelegate alloc] init];

Completed in 40 milliseconds

1234