Change contigmalloc() lower memory bound from 1MB to 0 to improve

chances of allocations succeeding on systems with small amounts of
RAM.

Pointed out by: bde
This commit is contained in:
Bill Paul 1999-09-25 17:29:02 +00:00
parent 87b0140cdf
commit 784733e9ec
11 changed files with 11 additions and 11 deletions

View file

@ -766,7 +766,7 @@ static int sf_attach(dev)
/* Allocate the descriptor queues. */
sc->sf_ldata = contigmalloc(sizeof(struct sf_list_data), M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->sf_ldata == NULL) {
printf("sf%d: no memory for list buffers!\n", unit);

View file

@ -756,7 +756,7 @@ static int vr_attach(dev)
bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
sc->vr_ldata = contigmalloc(sizeof(struct vr_list_data), M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->vr_ldata == NULL) {
printf("vr%d: no memory for list buffers!\n", unit);

View file

@ -923,7 +923,7 @@ static int al_attach(dev)
bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
sc->al_ldata = contigmalloc(sizeof(struct al_list_data), M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->al_ldata == NULL) {
printf("al%d: no memory for list buffers!\n", unit);

View file

@ -847,7 +847,7 @@ static int dm_attach(dev)
bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
sc->dm_ldata = contigmalloc(sizeof(struct dm_list_data), M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->dm_ldata == NULL) {
printf("dm%d: no memory for list buffers!\n", unit);

View file

@ -912,7 +912,7 @@ static int rl_attach(dev)
}
sc->rl_cdata.rl_rx_buf = contigmalloc(RL_RXBUFLEN + 32, M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->rl_cdata.rl_rx_buf == NULL) {
printf("rl%d: no memory for list buffers!\n", unit);

View file

@ -766,7 +766,7 @@ static int sf_attach(dev)
/* Allocate the descriptor queues. */
sc->sf_ldata = contigmalloc(sizeof(struct sf_list_data), M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->sf_ldata == NULL) {
printf("sf%d: no memory for list buffers!\n", unit);

View file

@ -655,7 +655,7 @@ static int sis_attach(dev)
bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
sc->sis_ldata = contigmalloc(sizeof(struct sis_list_data), M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->sis_ldata == NULL) {
printf("sis%d: no memory for list buffers!\n", unit);

View file

@ -1223,7 +1223,7 @@ static int tl_attach(dev)
* Now allocate memory for the TX and RX lists.
*/
sc->tl_ldata = contigmalloc(sizeof(struct tl_list_data), M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->tl_ldata == NULL) {
bus_teardown_intr(dev, sc->tl_irq, sc->tl_intrhand);

View file

@ -756,7 +756,7 @@ static int vr_attach(dev)
bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
sc->vr_ldata = contigmalloc(sizeof(struct vr_list_data), M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->vr_ldata == NULL) {
printf("vr%d: no memory for list buffers!\n", unit);

View file

@ -928,7 +928,7 @@ static int wb_attach(dev)
bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
sc->wb_ldata = contigmalloc(sizeof(struct wb_list_data) + 8, M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->wb_ldata == NULL) {
printf("wb%d: no memory for list buffers!\n", unit);

View file

@ -1306,7 +1306,7 @@ static int xl_attach(dev)
bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
sc->xl_ldata = contigmalloc(sizeof(struct xl_list_data), M_DEVBUF,
M_NOWAIT, 0x100000, 0xffffffff, PAGE_SIZE, 0);
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
if (sc->xl_ldata == NULL) {
printf("xl%d: no memory for list buffers!\n", unit);