1. A method of allocating memory for a task in a computer-implemented system, where the task is executable by an operating system residing on the computer-implemented system, comprising the steps of: providing predefined memory requirements for the task, the predefined memory requirements include a permanent memory component and a transient memory component, such that the transient memory component is accessible to the task only during execution of the task; allocating a memory space for the task according to the predefined memory requirements associated with the task; executing the task only when the memory space available to the task at least meets the predefined memory requirements for the task; preventing the task from allocating an additional memory space that exceeds the predefined memory requirements for the task; and upon completing execution of the task, releasing a portion of the memory space, which corresponds to the transient memory component of the memory space.