VirtualBox

Changeset 27571 in vbox for trunk/src


Ignore:
Timestamp:
Mar 22, 2010 8:32:26 AM (15 years ago)
Author:
vboxsync
Message:

NAT: some spaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/misc.c

    r27569 r27571  
    185185        LogRel(("NAT: zone(%s) has reached it maximum\n", zone->name));
    186186
    187     allocated:
     187allocated:
    188188    if (zone->pfInit)
    189189        zone->pfInit(zone->pData, (void *)&it[1], zone->size, M_DONTWAIT);
     
    209209
    210210uma_zone_t uma_zcreate(PNATState pData, char *name, size_t size,
    211     ctor_t ctor, dtor_t dtor, zinit_t init, zfini_t fini, int flags1, int flags2)
     211                       ctor_t ctor, dtor_t dtor, zinit_t init, zfini_t fini, int flags1, int flags2)
    212212{
    213213    uma_zone_t zone = RTMemAllocZ(sizeof(struct uma_zone) + size);
     
    237237    zone = RTMemAllocZ(sizeof(struct uma_zone));
    238238    if (zone == NULL)
    239     {
    240239        return NULL;
    241     }
     240
    242241    Assert((master && master->pData));
    243242    zone->magic = ZONE_MAGIC;
     
    254253    return zone;
    255254}
     255
    256256void uma_zone_set_max(uma_zone_t zone, int max)
    257257{
    258258    zone->max_items = max;
    259259}
     260
    260261void uma_zone_set_allocf(uma_zone_t zone, uma_alloc_t pfAlloc)
    261262{
    262263   zone->pfAlloc = pfAlloc;
    263264}
     265
    264266void uma_zone_set_freef(uma_zone_t zone, uma_free_t pfFree)
    265267{
     
    278280    return &it[-1].ref_count;
    279281}
     282
    280283void *uma_zalloc_arg(uma_zone_t zone, void *args, int how)
    281284{
     
    303306    if (zone->pfFree == NULL)
    304307        return;
     308
    305309    Assert((mem));
    306310    RTCritSectEnter(&zone->csZone);
     
    320324    RTCritSectLeave(&zone->csZone);
    321325}
     326
    322327int uma_zone_exhausted_nolock(uma_zone_t zone)
    323328{
    324329    return 0;
    325330}
     331
    326332void zone_drain(uma_zone_t zone)
    327333{
     
    389395    RTMemFree(zone);
    390396}
     397
    391398void m_fini(PNATState pData)
    392399{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette