这篇教程C++ wmem_new函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中wmem_new函数的典型用法代码示例。如果您正苦于以下问题:C++ wmem_new函数的具体用法?C++ wmem_new怎么用?C++ wmem_new使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了wmem_new函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: mncp_hash_insertstatic mncp_rhash_value*mncp_hash_insert(conversation_t *conversation, guint32 nwconnection, guint8 nwtask, packet_info *pinfo){ mncp_rhash_key *key; mncp_rhash_value *value; /* Now remember the request, so we can find it if we later a reply to it. Track by conversation, connection, and task number. in NetWare these values determine each unique session */ key = wmem_new(wmem_file_scope(), mncp_rhash_key); key->conversation = conversation; key->nwconnection = nwconnection; key->nwtask = nwtask; value = wmem_new(wmem_file_scope(), mncp_rhash_value); g_hash_table_insert(mncp_rhash, key, value); if (ncp_echo_conn && nwconnection != 65535) { expert_add_info_format(pinfo, NULL, &ei_ncp_new_server_session, "Detected New Server Session. Connection %d, Task %d", nwconnection, nwtask); value->session_start_packet_num = pinfo->fd->num; } return value;}
开发者ID:hashbrowncipher,项目名称:wireshark,代码行数:25,
示例2: new_h225ras_callh225ras_call_t * new_h225ras_call(h225ras_call_info_key *h225ras_call_key, packet_info *pinfo, e_guid_t *guid, int category){ h225ras_call_info_key *new_h225ras_call_key; h225ras_call_t *h225ras_call = NULL; /* Prepare the value data. "req_num" and "rsp_num" are frame numbers; frame numbers are 1-origin, so we use 0 to mean "we don't yet know in which frame the reply for this call appears". */ new_h225ras_call_key = wmem_new(wmem_file_scope(), h225ras_call_info_key); new_h225ras_call_key->reqSeqNum = h225ras_call_key->reqSeqNum; new_h225ras_call_key->conversation = h225ras_call_key->conversation; h225ras_call = wmem_new(wmem_file_scope(), h225ras_call_t); h225ras_call->req_num = pinfo->fd->num; h225ras_call->rsp_num = 0; h225ras_call->requestSeqNum = h225ras_call_key->reqSeqNum; h225ras_call->responded = FALSE; h225ras_call->next_call = NULL; h225ras_call->req_time=pinfo->fd->abs_ts; h225ras_call->guid=*guid; /* store it */ g_hash_table_insert(ras_calls[category], new_h225ras_call_key, h225ras_call); return h225ras_call;}
开发者ID:MichaelQQ,项目名称:Wireshark-PE,代码行数:27,
示例3: wmem_allocator_force_new/* A local copy of wmem_allocator_new that ignores the * WIRESHARK_DEBUG_WMEM_OVERRIDE variable so that test functions are * guaranteed to actually get the allocator type they asked for */static wmem_allocator_t *wmem_allocator_force_new(const wmem_allocator_type_t type){ wmem_allocator_t *allocator; allocator = wmem_new(NULL, wmem_allocator_t); allocator->type = type; allocator->callbacks = NULL; allocator->in_scope = TRUE; switch (type) { case WMEM_ALLOCATOR_SIMPLE: wmem_simple_allocator_init(allocator); break; case WMEM_ALLOCATOR_BLOCK: wmem_block_allocator_init(allocator); break; case WMEM_ALLOCATOR_BLOCK_FAST: wmem_block_fast_allocator_init(allocator); break; case WMEM_ALLOCATOR_STRICT: wmem_strict_allocator_init(allocator); break; default: g_assert_not_reached(); /* This is necessary to squelch MSVC errors; is there any way to tell it that g_assert_not_reached() never returns? */ return NULL; }; return allocator;}
开发者ID:jiangxilong,项目名称:wireshark-1,代码行数:36,
示例4: lbm_transport_frame_add/*----------------------------------------------------------------------------*/lbm_transport_frame_t * lbm_transport_frame_add(wmem_tree_t * list, guint8 type, guint32 frame, guint32 sqn, gboolean retransmission){ lbm_transport_frame_t * frame_entry = NULL; /* Locate the frame. */ frame_entry = (lbm_transport_frame_t *) wmem_tree_lookup32(list, frame); if (frame_entry != NULL) { return (frame_entry); } frame_entry = wmem_new(wmem_file_scope(), lbm_transport_frame_t); frame_entry->frame = frame; frame_entry->type = type; frame_entry->sqn = sqn; frame_entry->previous_frame = 0; frame_entry->previous_type_frame = 0; frame_entry->next_frame = 0; frame_entry->next_type_frame = 0; frame_entry->retransmission = retransmission; frame_entry->sqn_gap = 0; frame_entry->ooo_gap = 0; frame_entry->duplicate = FALSE; wmem_tree_insert32(list, frame, (void *) frame_entry); return (frame_entry);}
开发者ID:ARK1988,项目名称:wireshark,代码行数:26,
示例5: lbmtcp_transport_addstatic lbmtcp_transport_t * lbmtcp_transport_add(const address * address1, guint16 port1, const address * address2, guint16 port2, guint32 frame){ lbmtcp_transport_t * entry; conversation_t * conv = NULL; conv = find_conversation(frame, address1, address2, PT_TCP, port1, port2, 0); if (conv == NULL) { conv = conversation_new(frame, address1, address2, PT_TCP, port1, port2, 0); } entry = (lbmtcp_transport_t *) conversation_get_proto_data(conv, lbmpdm_tcp_protocol_handle); if (entry != NULL) { return (entry); } entry = wmem_new(wmem_file_scope(), lbmtcp_transport_t); copy_address_wmem(wmem_file_scope(), &(entry->addr1), address1); entry->port1 = port1; copy_address_wmem(wmem_file_scope(), &(entry->addr2), address2); entry->port2 = port2; lbmtcp_order_key(entry); entry->channel = lbm_channel_assign(LBM_CHANNEL_TCP); conversation_add_proto_data(conv, lbmpdm_tcp_protocol_handle, (void *) entry); return (entry);}
开发者ID:CharaD7,项目名称:wireshark,代码行数:25,
示例6: register_follow_streamvoid register_follow_stream(const int proto_id, const char* tap_listener, follow_conv_filter_func conv_filter, follow_index_filter_func index_filter, follow_address_filter_func address_filter, follow_port_to_display_func port_to_display, tap_packet_cb tap_handler){ register_follow_t *follower; DISSECTOR_ASSERT(tap_listener); DISSECTOR_ASSERT(conv_filter); DISSECTOR_ASSERT(index_filter); DISSECTOR_ASSERT(address_filter); DISSECTOR_ASSERT(port_to_display); DISSECTOR_ASSERT(tap_handler); follower = wmem_new(wmem_epan_scope(), register_follow_t); follower->proto_id = proto_id; follower->tap_listen_str = tap_listener; follower->conv_filter = conv_filter; follower->index_filter = index_filter; follower->address_filter = address_filter; follower->port_to_display = port_to_display; follower->tap_handler = tap_handler; if (registered_followers == NULL) registered_followers = wmem_tree_new(wmem_epan_scope()); wmem_tree_insert_string(registered_followers, proto_get_protocol_short_name(find_protocol_by_id(proto_id)), follower, 0);}
开发者ID:wireshark,项目名称:wireshark,代码行数:27,
示例7: lbttcp_transport_sid_addvoid lbttcp_transport_sid_add(const address * source_address, guint16 source_port, guint32 frame, guint32 session_id){ conversation_t * conv = NULL; lbttcp_transport_conv_data_t * conv_data = NULL; lbttcp_transport_t * transport = NULL; conv = find_conversation(frame, source_address, &lbttcp_null_address, PT_TCP, source_port, 0, 0); if (conv == NULL) { conv = conversation_new(frame, source_address, &lbttcp_null_address, PT_TCP, source_port, 0, 0); } conv_data = (lbttcp_transport_conv_data_t *) conversation_get_proto_data(conv, proto_lbttcp); if (conv_data == NULL) { conv_data = wmem_new(wmem_file_scope(), lbttcp_transport_conv_data_t); conv_data->frame_tree = wmem_tree_new(wmem_file_scope()); conv_data->session_tree = wmem_tree_new(wmem_file_scope()); conversation_add_proto_data(conv, proto_lbttcp, (void *) conv_data); } /* Lookup by frame */ transport = (lbttcp_transport_t *) wmem_tree_lookup32_le(conv_data->frame_tree, frame); if (transport != NULL) { if (transport->session_id != session_id) { transport = NULL; } } if (transport == NULL) { transport = lbttcp_transport_create(source_address, source_port, session_id); wmem_tree_insert32(conv_data->session_tree, session_id, (void *) transport); wmem_tree_insert32(conv_data->frame_tree, frame, (void *) transport); }}
开发者ID:crondaemon,项目名称:wireshark,代码行数:35,
示例8: lbttcp_transport_addlbttcp_transport_t * lbttcp_transport_add(const address * source_address, guint16 source_port, guint32 session_id, guint32 frame){ lbttcp_transport_t * entry = NULL; conversation_t * conv = NULL; lbttcp_transport_conv_data_t * conv_data = NULL; conv = find_conversation(frame, source_address, &lbttcp_null_address, PT_TCP, source_port, 0, 0); if (conv == NULL) { conv = conversation_new(frame, source_address, &lbttcp_null_address, PT_TCP, source_port, 0, 0); } conv_data = (lbttcp_transport_conv_data_t *) conversation_get_proto_data(conv, proto_lbttcp); if (conv_data == NULL) { conv_data = wmem_new(wmem_file_scope(), lbttcp_transport_conv_data_t); conv_data->frame_tree = wmem_tree_new(wmem_file_scope()); conv_data->session_tree = wmem_tree_new(wmem_file_scope()); conversation_add_proto_data(conv, proto_lbttcp, (void *) conv_data); } entry = (lbttcp_transport_t *) wmem_tree_lookup32(conv_data->session_tree, session_id); if (entry != NULL) { return (entry); } entry = lbttcp_transport_create(source_address, source_port, session_id); wmem_tree_insert32(conv_data->session_tree, session_id, (void *) entry); wmem_tree_insert32(conv_data->frame_tree, frame, (void *) entry); return (entry);}
开发者ID:crondaemon,项目名称:wireshark,代码行数:29,
示例9: conversation_new/* * Given two address/port pairs for a packet, create a new conversation * to contain packets between those address/port pairs. * * The options field is used to specify whether the address 2 value * and/or port 2 value are not given and any value is acceptable * when searching for this conversation. */conversation_t *conversation_new(const guint32 setup_frame, const address *addr1, const address *addr2, const port_type ptype, const guint32 port1, const guint32 port2, const guint options){/* DISSECTOR_ASSERT(!(options | CONVERSATION_TEMPLATE) || ((options | (NO_ADDR2 | NO_PORT2 | NO_PORT2_FORCE))) && "A conversation template may not be constructed without wildcard options");*/ GHashTable* hashtable; conversation_t *conversation=NULL; conversation_key *new_key; DPRINT(("creating conversation for frame #%d: %s:%d -> %s:%d (ptype=%d)", setup_frame, address_to_str(wmem_packet_scope(), addr1), port1, address_to_str(wmem_packet_scope(), addr2), port2, ptype)); if (options & NO_ADDR2) { if (options & (NO_PORT2|NO_PORT2_FORCE)) { hashtable = conversation_hashtable_no_addr2_or_port2; } else { hashtable = conversation_hashtable_no_addr2; } } else { if (options & (NO_PORT2|NO_PORT2_FORCE)) { hashtable = conversation_hashtable_no_port2; } else { hashtable = conversation_hashtable_exact; } } new_key = wmem_new(wmem_file_scope(), struct conversation_key); new_key->next = conversation_keys; conversation_keys = new_key; copy_address_wmem(wmem_file_scope(), &new_key->addr1, addr1); copy_address_wmem(wmem_file_scope(), &new_key->addr2, addr2); new_key->ptype = ptype; new_key->port1 = port1; new_key->port2 = port2; conversation = wmem_new(wmem_file_scope(), conversation_t); memset(conversation, 0, sizeof(conversation_t)); conversation->index = new_index; conversation->setup_frame = conversation->last_frame = setup_frame; conversation->data_list = NULL; conversation->dissector_tree = wmem_tree_new(wmem_file_scope()); /* set the options and key pointer */ conversation->options = options; conversation->key_ptr = new_key; new_index++; DINDENT(); conversation_insert_into_hashtable(hashtable, conversation); DENDENT(); return conversation;}
开发者ID:CharaD7,项目名称:wireshark,代码行数:68,
示例10: wmem_new/* new pdu in this stream */static stream_pdu_t *stream_new_pdu(stream_t *stream){ stream_pdu_t *pdu; pdu = wmem_new(wmem_file_scope(), stream_pdu_t); pdu -> fd_head = NULL; pdu -> pdu_number = stream -> pdu_counter++; pdu -> id = pdu_counter++; return pdu;}
开发者ID:acaceres2176,项目名称:wireshark,代码行数:10,
示例11: add_oidstatic oid_info_t* add_oid(const char* name, oid_kind_t kind, const oid_value_type_t* type, oid_key_t* key, guint oid_len, guint32 *subids) { guint i = 0; oid_info_t* c = &oid_root; prepopulate_oids(); oid_len--; do { oid_info_t* n = (oid_info_t *)wmem_tree_lookup32(c->children,subids[i]); if(n) { if (i == oid_len) { if (n->name) { if (!g_str_equal(n->name,name)) { D(2,("Renaming Oid from: %s -> %s, this means the same oid is registered more than once",n->name,name)); } wmem_free(wmem_epan_scope(), n->name); } n->name = wmem_strdup(wmem_epan_scope(), name); if (! n->value_type) { n->value_type = type; } return n; } } else { n = wmem_new(wmem_epan_scope(), oid_info_t); n->subid = subids[i]; n->kind = kind; n->children = wmem_tree_new(wmem_epan_scope()); n->value_hfid = -2; n->key = key; n->parent = c; n->bits = NULL; wmem_tree_insert32(c->children,n->subid,n); if (i == oid_len) { n->name = wmem_strdup(wmem_epan_scope(), name); n->value_type = type; n->kind = kind; return n; } else { n->name = NULL; n->value_type = NULL; n->kind = OID_KIND_UNKNOWN; } } c = n; } while(++i); g_assert_not_reached(); return NULL;}
开发者ID:pvons,项目名称:wireshark,代码行数:56,
示例12: wmem_tree_newwmem_tree_t *wmem_tree_new(wmem_allocator_t *allocator){ wmem_tree_t *tree; tree = wmem_new(allocator, wmem_tree_t); tree->master = allocator; tree->allocator = allocator; tree->root = NULL; return tree;}
开发者ID:dot-Sean,项目名称:wireshark-http2,代码行数:12,
示例13: lbttcp_transport_createstatic lbttcp_transport_t * lbttcp_transport_create(const address * source_address, guint16 source_port, guint32 session_id){ lbttcp_transport_t * transport = NULL; transport = wmem_new(wmem_file_scope(), lbttcp_transport_t); copy_address_wmem(wmem_file_scope(), &(transport->source_address), source_address); transport->source_port = source_port; transport->session_id = session_id; transport->channel = lbm_channel_assign(LBM_CHANNEL_TRANSPORT_LBTTCP); transport->next_client_id = 1; transport->client_list = wmem_list_new(wmem_file_scope()); return (transport);}
开发者ID:crondaemon,项目名称:wireshark,代码行数:13,
示例14: mark_pmproxy_exchange_completestatic void mark_pmproxy_exchange_complete(packet_info *pinfo) { conversation_t *conversation; pmproxy_conversation_info_t *pmproxy_conversation; conversation = find_or_create_conversation(pinfo); pmproxy_conversation = (pmproxy_conversation_info_t *)conversation_get_proto_data(conversation, proto_pmproxy); if(pmproxy_conversation == NULL) { pmproxy_conversation = wmem_new(wmem_file_scope(), pmproxy_conversation_info_t); } pmproxy_conversation->last_proxy_frame = pinfo->num; conversation_add_proto_data(conversation, proto_pmproxy, pmproxy_conversation);}
开发者ID:acaceres2176,项目名称:wireshark,代码行数:13,
示例15: circuit_add_proto_datavoidcircuit_add_proto_data(circuit_t *conv, int proto, void *proto_data){ circuit_proto_data *p1 = wmem_new(wmem_file_scope(), circuit_proto_data); p1->proto = proto; p1->proto_data = proto_data; /* Add it to the list of items for this circuit. */ conv->data_list = g_slist_insert_sorted(conv->data_list, (gpointer *)p1, p_compare);}
开发者ID:DHODoS,项目名称:wireshark,代码行数:13,
示例16: find_protocol_by_idexpert_module_t *expert_register_protocol(int id){ expert_module_t *module; protocol_t *protocol; protocol = find_protocol_by_id(id); module = wmem_new(wmem_epan_scope(), expert_module_t); module->proto_id = id; module->proto_name = proto_get_protocol_short_name(protocol); return module;}
开发者ID:DuLerWeil,项目名称:wireshark,代码行数:13,
示例17: circuit_new/* * Given a circuit type and circuit ID for a packet, create a new circuit * to contain packets for that circuit. */circuit_t *circuit_new(circuit_type ctype, guint32 circuit_id, guint32 first_frame){ circuit_t *circuit, *old_circuit; circuit_key *new_key; new_key = wmem_new(wmem_file_scope(), struct circuit_key); new_key->ctype = ctype; new_key->circuit_id = circuit_id; circuit = wmem_new(wmem_file_scope(), circuit_t); circuit->next = NULL; circuit->first_frame = first_frame; circuit->last_frame = 0; /* not known yet */ circuit->circuit_index = new_index; circuit->data_list = NULL; circuit->dissector_handle = NULL; circuit->key_ptr = new_key; new_index++; /* * Is there already a circuit with this circuit ID? */ old_circuit = (circuit_t *)g_hash_table_lookup(circuit_hashtable, new_key); if (old_circuit != NULL) { /* * Yes. Find the last circuit in the list of circuits * with this circuit ID, and if its last frame isn't * known, make it be the previous frame to this one. */ while (old_circuit->next != NULL) old_circuit = old_circuit->next; if (old_circuit->last_frame == 0) old_circuit->last_frame = first_frame - 1; /* * Now put the new circuit after the last one in the * list. */ old_circuit->next = circuit; } else { /* * No. This is the first one with this circuit ID; add * it to the hash table. */ g_hash_table_insert(circuit_hashtable, new_key, circuit); } return circuit;}
开发者ID:DHODoS,项目名称:wireshark,代码行数:55,
示例18: lbm_transport_sqn_addlbm_transport_sqn_t * lbm_transport_sqn_add(wmem_tree_t * list, lbm_transport_frame_t * frame){ lbm_transport_sqn_t * sqn_entry = NULL; lbm_transport_sqn_frame_t * frame_entry = NULL; /* Locate the SQN. */ sqn_entry = (lbm_transport_sqn_t *) wmem_tree_lookup32(list, frame->sqn); if (sqn_entry == NULL) { sqn_entry = wmem_new(wmem_file_scope(), lbm_transport_sqn_t); sqn_entry->sqn = frame->sqn; sqn_entry->frame_count = 0; sqn_entry->frame = wmem_tree_new(wmem_file_scope()); wmem_tree_insert32(list, frame->sqn, (void *) sqn_entry); } /* Add this frame to the list of frames this SQN appears in. */ frame_entry = wmem_new(wmem_file_scope(), lbm_transport_sqn_frame_t); frame_entry->frame = frame->frame; frame_entry->retransmission = frame->retransmission; wmem_tree_insert32(sqn_entry->frame, frame->frame, (void *) frame_entry); sqn_entry->frame_count++; return (sqn_entry);}
开发者ID:ARK1988,项目名称:wireshark,代码行数:23,
示例19: get_itl_nexusstatic itl_nexus_t *get_itl_nexus(packet_info *pinfo){ itl_nexus_t *itl = NULL; if (!(itl = (itl_nexus_t *)wmem_tree_lookup32_le(rsvd_conv_data->itl, pinfo->num))) { itl = wmem_new(wmem_file_scope(), itl_nexus_t); itl->cmdset = 0xff; itl->conversation = rsvd_conv_data->conversation; wmem_tree_insert32(rsvd_conv_data->itl, pinfo->num, itl); } return itl;}
开发者ID:DuLerWeil,项目名称:wireshark,代码行数:14,
示例20: wmem_list_newwmem_list_t *wmem_list_new(wmem_allocator_t *allocator){ wmem_list_t *list; list = wmem_new(allocator, wmem_list_t); list->count = 0; list->head = NULL; list->tail = NULL; list->allocator = allocator; return list;}
开发者ID:huzhiren,项目名称:wireshark,代码行数:14,
示例21: usbip_get_usbip_convstatic usbip_conv_info_t *usbip_get_usbip_conv(packet_info *pinfo){ conversation_t *conversation; usbip_conv_info_t *usbip_info; conversation = find_or_create_conversation(pinfo); usbip_info = (usbip_conv_info_t *) conversation_get_proto_data(conversation, proto_usbip); if (!usbip_info) { usbip_info = wmem_new(wmem_file_scope(), usbip_conv_info_t); usbip_info->pdus = wmem_tree_new(wmem_file_scope()); conversation_add_proto_data(conversation, proto_usbip, usbip_info); } return usbip_info;}
开发者ID:ip01,项目名称:wireshark,代码行数:16,
示例22: wmem_itree_insertvoidwmem_itree_insert(wmem_itree_t *tree, const guint64 low, const guint64 high, void *data){ wmem_tree_node_t *node; wmem_range_t *range = (wmem_range_t *)wmem_new(tree->allocator, wmem_range_t); g_assert(low <= high); range->low = low; range->high = high; range->max_edge = 0; node = wmem_tree_insert(tree, range, data, (compare_func)wmem_tree_compare_ranges); /* in absence of rotation, we still need to update max_edge */ update_max_edge(node);}
开发者ID:wireshark,项目名称:wireshark,代码行数:16,
示例23: add_msproxy_conversationstatic void add_msproxy_conversation( packet_info *pinfo, hash_entry_t *hash_info){/* check to see if a conversation already exists, if it does assume *//* it's our conversation and quit. Otherwise create a new conversation. *//* Load the conversation dissector to our dissector and load the *//* conversation data structure with the info needed to call the TCP or *//* UDP port decoder. *//* NOTE: Currently this assume that the conversation will be created *//* during a packet from the server. If that changes, pinfo->src *//* and pinfo->dst will not be correct and this routine will have *//* to change. */ conversation_t *conversation; redirect_entry_t *new_conv_info; if (pinfo->fd->flags.visited) { /* * We've already processed this frame once, so we * should already have done this. */ return; } conversation = find_conversation( pinfo->fd->num, &pinfo->src, &pinfo->dst, (port_type)hash_info->proto, hash_info->server_int_port, hash_info->clnt_port, 0); if ( !conversation) { conversation = conversation_new( pinfo->fd->num, &pinfo->src, &pinfo->dst, (port_type)hash_info->proto, hash_info->server_int_port, hash_info->clnt_port, 0); } conversation_set_dissector(conversation, msproxy_sub_handle); new_conv_info = wmem_new(wmem_file_scope(), redirect_entry_t); new_conv_info->remote_addr = hash_info->dst_addr; new_conv_info->clnt_port = hash_info->clnt_port; new_conv_info->remote_port = hash_info->dst_port; new_conv_info->server_int_port = hash_info->server_int_port; new_conv_info->proto = hash_info->proto; conversation_add_proto_data(conversation, proto_msproxy, new_conv_info);}
开发者ID:danielwhite84,项目名称:wireshark,代码行数:47,
示例24: add_sid_name_mappingstatic voidadd_sid_name_mapping(char *sid, char *name){ sid_name *sn; sid_name old_sn; old_sn.sid=sid; sn=(sid_name *)g_hash_table_lookup(sid_name_table, &old_sn); if(sn){ return; } sn=wmem_new(wmem_file_scope(), sid_name); sn->sid=g_strdup(sid); sn->name=g_strdup(name); g_hash_table_insert(sid_name_table, sn, sn);}
开发者ID:pvons,项目名称:wireshark,代码行数:17,
示例25: wmem_array_sized_newwmem_array_t *wmem_array_sized_new(wmem_allocator_t *allocator, gsize elem_size, guint alloc_count){ wmem_array_t *array; array = wmem_new(allocator, wmem_array_t); array->allocator = allocator; array->elem_size = elem_size; array->elem_count = 0; array->alloc_count = alloc_count ? alloc_count : 1; array->buf = (guint8 *)wmem_alloc(array->allocator, array->elem_size * array->alloc_count); return array;}
开发者ID:AndresVelasco,项目名称:wireshark,代码行数:18,
示例26: wmem_register_callbackguintwmem_register_callback(wmem_allocator_t *allocator, wmem_user_cb_t callback, void *user_data){ wmem_user_cb_container_t *container; static guint next_id = 0; container = wmem_new(NULL, wmem_user_cb_container_t); container->cb = callback; container->user_data = user_data; container->next = allocator->callbacks; container->id = next_id++; allocator->callbacks = container; return container->id;}
开发者ID:pvons,项目名称:wireshark,代码行数:18,
注:本文中的wmem_new函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ wmem_packet_scope函数代码示例 C++ wmem_free函数代码示例 |