How does worker memory get delegated to tasks?


What are the specifics on how worker memory gets delegated to tasks? E.g. if I have a worker with 4.5GB of memory, how much will actually be available to a particular task? Will it depend on the number of tasks that are being executed at once?