Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to skip the nursery?

Tags:

If I know a certain value is likely to survive its first encounter with the garbage collector, is there some way to let GHC know, so it can just allocate it directly somewhere outside the nursery? For instance, if I'm building up a large structure out of a bunch of smaller pieces, I know each piece will last at least until the whole structure is complete.

like image 434
dfeuer Avatar asked Dec 24 '14 02:12

dfeuer


People also ask

Is it compulsory to go to nursery?

What is Nursery? – Nursery is not mandatory. It is aimed at children in the year before joining school. Children join Nursery aged around three and a half and they remain there until starting school.

What age do most babies go to nursery?

Between 2 and 3. The majority of children start nursery between the ages of 2 and 3. By this age children are independent and curious, and are growing more interested in other children. These are all signs that your child is ready to start nursery and begin socialising with other kids.

Is nursery compulsory in India?

Though nursery is not mandatory, it definitely helps the child develop important social skills that can be ideally provided by a school environment.

Is 1 too early for nursery?

It varies from nursery to nursery, some offer care for babies 'from birth' but the youngest age that babies generally start nursery is around 3 months.


1 Answers

In the GHC garbage collector there are no hooks for hinting at the generation an object should be allocated to. However, you might be able to exploit the operational behavior in a couple of ways:

  • depending on the data type, you may be able to exploit the pinned object region to bypass the generational stages altogether.

  • exploit eager promotion by ensuring your long lived object is pointed out by something itself long lived...

  • make the data into a CAF and bypass dynamic allocation altogether.

like image 193
Don Stewart Avatar answered Oct 01 '22 09:10

Don Stewart