Documentation

Miri.Memory.AllocAddresses.ReusePool

A checked value port of Miri's size/alignment/thread keyed address reuse pool. RNG outputs are explicit legal-choice arguments; no seed or PRNG stream is introduced.

Only this distinction from rustc MemoryKind affects reuse-pool behavior: stack allocations are never remembered or reused. All other kinds follow the same pool policy.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[reducible, inline]

      The source thread index is an ordered u32.

      Equations
      Instances For
        • addressReuseRate : Float
        • addressReuseCrossThreadRate : Float
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[instance_reducible]
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            The support of a source rng.random_bool(rate) result. For interior rates both results are possible; endpoints permit only the corresponding result.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def Miri.Memory.AllocAddresses.ReusePool.addAddr (pool : ReusePool) (choice : Bool) (address : UInt64) (size : ABI.Size) (align : ABI.Align) (kind : AddressMemoryKind) (thread : AddressThreadId) (makeClock : Unit → Concurrency.VClock) :

                                  Add an address using the explicit outcome of the source Bernoulli draw. Stack addresses short-circuit before consuming that choice.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    def Miri.Memory.AllocAddresses.ReusePool.prepareTakeAddr (pool : ReusePool) (reuseChoice crossThreadChoice : Bool) (size : ABI.Size) (align : ABI.Align) (kind : AddressMemoryKind) (thread : AddressThreadId) :

                                    Source prefix before the pool-index random draw. Exposes the exact half-open candidate range while retaining ensure_subpool mutations, so an effectful choice input may be requested at the actual source event.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      def Miri.Memory.AllocAddresses.ReusePool.takeAddr (pool : ReusePool) (reuseChoice crossThreadChoice : Bool) (selection : Nat) (size : ABI.Size) (align : ABI.Align) (kind : AddressMemoryKind) (thread : AddressThreadId) :

                                      Try taking a reusable address. reuseChoice and crossThreadChoice are the two source Bernoulli outcomes; selection is the absolute usize index sampled from the source's eligible half-open [begin, stop) range. A missing candidate returns none while keeping the source's possibly extended empty subpool.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For

                                        The sorted-and-bounded pool invariant maintained by public mutations.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          theorem Miri.Memory.AllocAddresses.ReusePool.emptyPool_wellFormed (reuseRate crossThreadRate : Float) :
                                          { addressReuseRate := reuseRate, addressReuseCrossThreadRate := crossThreadRate }.WellFormed