Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 271 for unsafe (0.05 sec)

  1. guava/src/com/google/common/hash/LittleEndianByteArray.java

        private static final Unsafe theUnsafe;
    
        // The offset to the first element in a byte array.
        private static final int BYTE_ARRAY_BASE_OFFSET;
    
        /**
         * Returns an Unsafe. Suitable for use in a 3rd party package. Replace with a simple call to
         * Unsafe.getUnsafe when integrating into a JDK.
         *
         * @return an Unsafe instance if successful
         */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/Striped64.java

        final boolean cas(long cmp, long val) {
          return UNSAFE.compareAndSwapLong(this, valueOffset, cmp, val);
        }
    
        // Unsafe mechanics
        private static final Unsafe UNSAFE;
        private static final long valueOffset;
    
        static {
          try {
            UNSAFE = getUnsafe();
            Class<?> ak = Cell.class;
            valueOffset = UNSAFE.objectFieldOffset(ak.getDeclaredField("value"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 14 17:55:55 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/hash/Striped64.java

        final boolean cas(long cmp, long val) {
          return UNSAFE.compareAndSwapLong(this, valueOffset, cmp, val);
        }
    
        // Unsafe mechanics
        private static final Unsafe UNSAFE;
        private static final long valueOffset;
    
        static {
          try {
            UNSAFE = getUnsafe();
            Class<?> ak = Cell.class;
            valueOffset = UNSAFE.objectFieldOffset(ak.getDeclaredField("value"));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 14 17:55:55 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java

        private static Unsafe getUnsafe() {
          try {
            return Unsafe.getUnsafe();
          } catch (SecurityException tryReflectionInstead) {
          }
          try {
            return AccessController.doPrivileged(
                new PrivilegedExceptionAction<Unsafe>() {
                  @Override
                  public Unsafe run() throws Exception {
                    Class<Unsafe> k = Unsafe.class;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 20.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/collect/FluentIterable.java

       *
       * <p><b>{@code Stream} equivalent:</b> {@code stream.filter(predicate).findFirst()}.
       */
      public final Optional<@NonNull E> firstMatch(Predicate<? super E> predicate) {
        // Unsafe, but we can't do much about it now.
        return Iterables.<@NonNull E>tryFind((Iterable<@NonNull E>) getDelegate(), predicate);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Sep 24 13:42:31 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  6. src/cmd/api/main_test.go

    	w := &Walker{
    		context:  context,
    		root:     root,
    		features: map[string]bool{},
    		imported: map[string]*apiPackage{"unsafe": &apiPackage{Package: types.Unsafe}},
    	}
    	w.loadImports()
    	return w
    }
    
    func (w *Walker) Features() (fs []string) {
    	for f := range w.features {
    		fs = append(fs, f)
    	}
    	sort.Strings(fs)
    	return
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Sep 04 18:16:59 UTC 2024
    - 31.4K bytes
    - Viewed (0)
  7. api/go1.7.txt

    pkg reflect, method (StructTag) Lookup(string) (string, bool)
    pkg runtime, func CallersFrames([]uintptr) *Frames
    pkg runtime, func KeepAlive(interface{})
    pkg runtime, func SetCgoTraceback(int, unsafe.Pointer, unsafe.Pointer, unsafe.Pointer)
    pkg runtime, method (*Frames) Next() (Frame, bool)
    pkg runtime, type Frame struct
    pkg runtime, type Frame struct, Entry uintptr
    pkg runtime, type Frame struct, File string
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Jun 28 15:08:11 UTC 2016
    - 13.6K bytes
    - Viewed (0)
  8. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedSet.java

        }
      }
    
      // Unsafe, see ImmutableSortedSetFauxverideShim.
      @SuppressWarnings("unchecked")
      public static <E> ImmutableSortedSet<E> copyOf(Collection<? extends E> elements) {
        return copyOfInternal((Ordering<E>) Ordering.natural(), (Collection<E>) elements, false);
      }
    
      // Unsafe, see ImmutableSortedSetFauxverideShim.
      @SuppressWarnings("unchecked")
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  9. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/ImmutableSortedMap.java

        return Collectors.collectingAndThen(
            Collectors.toMap(
                keyFunction, valueFunction, mergeFunction, () -> new TreeMap<K, V>(comparator)),
            ImmutableSortedMap::copyOfSorted);
      }
    
      // unsafe, comparator() returns a comparator on the specified type
      @SuppressWarnings("unchecked")
      public static <K, V> ImmutableSortedMap<K, V> of() {
        return new Builder<K, V>((Comparator<K>) NATURAL_ORDER).build();
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Feb 27 19:19:19 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  10. src/cmd/cgo/doc.go

    	// #include <stdio.h>
    	// #include <stdlib.h>
    	//
    	// static void myprint(char* s) {
    	//   printf("%s\n", s);
    	// }
    	import "C"
    	import "unsafe"
    
    	func main() {
    		cs := C.CString("Hello from stdio")
    		C.myprint(cs)
    		C.free(unsafe.Pointer(cs))
    	}
    
    A few special functions convert between Go and C types
    by making copies of the data. In pseudo-Go definitions:
    
    	// Go string to C string
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Oct 01 22:52:54 UTC 2024
    - 44K bytes
    - Viewed (0)
Back to top