/[lwip]/lwip/src/core/pbuf.c
ViewVC logotype

Diff of /lwip/src/core/pbuf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.57.2.1 by marcbou, Thu Jun 19 11:34:02 2003 UTC revision 1.57.2.2 by marcbou, Thu Jun 19 12:32:25 2003 UTC
# Line 323  pbuf_alloc(pbuf_layer l, u16_t length, p Line 323  pbuf_alloc(pbuf_layer l, u16_t length, p
323    /* pbuf references existing (externally allocated) RAM payload? */    /* pbuf references existing (externally allocated) RAM payload? */
324    case PBUF_REF:    case PBUF_REF:
325      /* only allocate memory for the pbuf structure */      /* only allocate memory for the pbuf structure */
326      p = memp_mallocp(MEMP_PBUF);      p = memp_malloc(MEMP_PBUF);
327      if (p == NULL) {      if (p == NULL) {
328        LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 2, ("pbuf_alloc: Could not allocate MEMP_PBUF for PBUF_%s.\n", flag == PBUF_ROM?"ROM":"REF"));        LWIP_DEBUGF(PBUF_DEBUG | DBG_TRACE | 2, ("pbuf_alloc: Could not allocate MEMP_PBUF for PBUF_%s.\n", flag == PBUF_ROM?"ROM":"REF"));
329        return NULL;        return NULL;
# Line 576  pbuf_free(struct pbuf *p) Line 576  pbuf_free(struct pbuf *p)
576          PBUF_POOL_FREE(p);          PBUF_POOL_FREE(p);
577        /* a ROM or RAM referencing pbuf */        /* a ROM or RAM referencing pbuf */
578        } else if (p->flags == PBUF_FLAG_ROM || p->flags == PBUF_FLAG_REF) {        } else if (p->flags == PBUF_FLAG_ROM || p->flags == PBUF_FLAG_REF) {
579          memp_freep(MEMP_PBUF, p);          memp_free(MEMP_PBUF, p);
580        /* p->flags == PBUF_FLAG_RAM */        /* p->flags == PBUF_FLAG_RAM */
581        } else {        } else {
582          mem_free(p);          mem_free(p);

Legend:
Removed from v.1.57.2.1  
changed lines
  Added in v.1.57.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26