Re: request_region checks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arvin,

> The point is that with "request_region" the region you requested is internally
> inserted in a linked list. So you are not supposed to free the memory,
> unless it is removed again from that list. And this is done by the
> "release_region" macro implicitly (removed from the list and the memory
> released).
>
Ok, I see - I was looking to see if was doing anything clever, but hadn't found
the point where the allocated memory was inserted into a list - but I've
seemingly missed it. This must be the location of insertion in the
__request_resource function?

	for (;;) {
		tmp = *p;
		if (!tmp || tmp->start > end) {
			new->sibling = tmp;
*->>>>>*		*p = new;
			new->parent = root;
			return NULL;
		}
		p = &tmp->sibling;
		if (tmp->end < start)
			continue;
		return tmp;
	}


> Hope this makes it a bit clearer.
> Arvin
>

Yes, thanks for your feedback.

Cheers, Mark.


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux